A_LookEx Defaults to LOOKALLAROUND behavior
Posted: Wed Apr 24, 2024 5:09 pm
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.
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.