ZDoom / gzdoom

GZDoom is a feature centric port for all Doom engine games, based on ZDoom, adding an OpenGL renderer and powerful scripting capabilities
http://zdoom.org
GNU General Public License v3.0
2.33k stars 528 forks source link

Bug fix: blur sphere currently does not affect enemy aim #2560

Closed Kartinea closed 1 month ago

Kartinea commented 2 months ago

Some new code was added to affect enemy aim if an invisible actor is between the enemy and its target. However, this inadvertently caused the effect to stop working if the target itself is invisible and no invisible actor is between the enemy and target.

When calling CheckForShadows(), we are incorrectly returning a nullptr actor if nothing is between the monster and the player. This results in the monster aiming as if you don't have invisibility.

Fall back to returning the target actor if it is shadowed but nothing is in between the two.

Fixes #2566