Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 22, 2024

Conversation

Kartinea
Copy link

@Kartinea Kartinea commented May 6, 2024

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

When performing the ShadowBlock check, we previously would return a nullptr actor if nothing was between the monster and the player.  This resulted in the monster aiming as if you didn't have invisibility.

Fall back to returning the target actor if it is shadowed but nothing is in between the two.
@Kartinea Kartinea changed the title Fix invisibility affect on enemies Fix invisibility affect on enemy aim May 6, 2024
@Kartinea Kartinea changed the title Fix invisibility affect on enemy aim Bug fix: blur sphere currently does not affect enemy aim May 11, 2024
@coelckers coelckers merged commit 3bc54d3 into ZDoom:master May 22, 2024
10 checks passed
@Kartinea Kartinea deleted the invis-fix branch May 23, 2024 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Blur sphere powerup does not affect enemy aim
3 participants