A_LookEx Defaults to LOOKALLAROUND behavior

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.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: A_LookEx Defaults to LOOKALLAROUND behavior

Re: A_LookEx Defaults to LOOKALLAROUND behavior

by AFADoomer » Tue Apr 30, 2024 4:22 am

Thanks to both of you!

Re: A_LookEx Defaults to LOOKALLAROUND behavior

by Nash » Tue Apr 30, 2024 12:03 am

Re: A_LookEx Defaults to LOOKALLAROUND behavior

by Ru5tK1ng » Mon Apr 29, 2024 10:15 pm

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

by Nash » Sun Apr 28, 2024 7:32 pm

Notified the author of the original PR, on Github. Hopefully they'll fix it.

Re: A_LookEx Defaults to LOOKALLAROUND behavior

by AFADoomer » Sun Apr 28, 2024 2:13 pm

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.

A_LookEx Defaults to LOOKALLAROUND behavior

by AFADoomer » 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.
Attachments
LookTest.pk3
(278 Bytes) Downloaded 27 times

Top