Tree stump highlighting missing

The worst monsters in the Hearthlands warp the fabric of space and time..
User avatar
ReaperSWE
Posts: 21
Joined: Sat Sep 19, 2009 7:36 pm

Tree stump highlighting missing

Post by ReaperSWE »

On this occasion, a birch tree stump wasn't being highlighted when hidden behind an apple tree. Forcing me to cut down the apple tree to remove the birch stump.
User avatar
loftar
Posts: 9096
Joined: Fri Apr 03, 2009 7:05 am
Location: Your character database

Re: Tree stump highlighting missing

Post by loftar »

The problem with highlighting is that only the base coordinate of objects is checked for obstruction. Probably, that coordinate for the stump happened to be behind a pixel on the apple tree that wasn't opaque enough to be considered an obstruction. To be properly fixed, more than just the base coordinate should be checked, but I haven't yet figured out how to do that in a way that doesn't waste a ton of CPU time.
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
ReaperSWE
Posts: 21
Joined: Sat Sep 19, 2009 7:36 pm

Re: Tree stump highlighting missing

Post by ReaperSWE »

You could check the top left, base, and bottom right for obstruction, average the numbers, and draw the highlighting based on that?

Return to “Bugs”