As of this commit, A_LookEx defaults to using LOOKALLAROUND behavior even if that flag is not set. This affects current 4.12 stable releases.
I *think* the cause of this is:
The commit fixes P_IsVisible to properly respect the 'allaround' parameter passed into it, which has upstream effects on P_LookForPlayers, which is called by A_LookEx. In the past, 'true' was passed in to P_LookForPlayers as the second parameter when it was called; this has been fixed to add a check for self->flags4 & MF4_LOOKALLAROUND in all places except on line 2142.
Demo attached. Summon 'looktest' - This is a simple static actor that uses the dog sprites and changes to an exclamation mark when it sees you via A_LookEx(). In 4.11 and earlier, it only sees you when you cross the 90-degree threshold to its left or right, so you are in front of it. In 4.12 it will always see you, regardless of what angle you are standing at.
A_LookEx Defaults to LOOKALLAROUND behavior
Moderator: GZDoom Developers
Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
A_LookEx Defaults to LOOKALLAROUND behavior
- Attachments
-
LookTest.pk3
- (278 Bytes) Downloaded 27 times
Re: A_LookEx Defaults to LOOKALLAROUND behavior
Double posting to note that this is still broken in 4.12.2.
For released example of this causing problems, Blade of Agony's guards can no longer be sneaked up on - playing the first map (C1M1), the guards in the beginning of the map that spawn facing away from the player always wake up and start firing as soon as there's no map geometry between them and the player.
For released example of this causing problems, Blade of Agony's guards can no longer be sneaked up on - playing the first map (C1M1), the guards in the beginning of the map that spawn facing away from the player always wake up and start firing as soon as there's no map geometry between them and the player.
Re: A_LookEx Defaults to LOOKALLAROUND behavior
Notified the author of the original PR, on Github. Hopefully they'll fix it.
Re: A_LookEx Defaults to LOOKALLAROUND behavior
Thanks for the test pk3. Added the additional check as you pointed: https://github.com/ZDoom/gzdoom/pull/2547
Re: A_LookEx Defaults to LOOKALLAROUND behavior
Thanks to both of you!