Page 1 of 1

A_LookEx with LOF_NOJUMP flag jumps to See state regardless?

PostPosted: Sun Jun 23, 2019 10:41 am
by Cherno
Did anyone recently used A_LookEx with the LOF_NOJUMP flag successfully? Apparently, the flag is ignored and it always jumps to the monster's See state (no matter which State you provide, even "null").

Code: Select allExpand view
Spawn:
      BATH BBCCDDEEDDCCBB 1
      {
         A_LookEx(LOF_NOJUMP, 0, 0, 0, 180, "See");
      }
      Loop;

      See:
      TNT1 A 0
      {
         A_Log("Chase");
      }
      BATH B 1 A_Chase;
                Loop;

Re: A_LookEx with LOF_NOJUMP flag jumps to See state regardl

PostPosted: Sun Jun 23, 2019 6:08 pm
by Blue Shadow
You might want to provide a runnable example which produces the problem, because in my tests the flag works fine.

Re: A_LookEx with LOF_NOJUMP flag jumps to See state regardl

PostPosted: Fri Jul 12, 2019 4:17 pm
by Cherno
Ok, after some further testing it seems like the jump to a specified state ("See" by default) is indeed averted, but I still think there is buggy behavior seeing as the alert sound is played as if the monster was alerted.

Code: Select allExpand view
class ZombiemanTest : Zombieman replaces Zombieman
{
   States
   {
      Spawn:
      POSS AB 10
      {
         A_LookEx(LOF_NOJUMP,0,0,0,0,"See");//monster doesn't jump to the See state, but plays alert sound constantly.
      }
      Loop;

   }
}


I assume that the workaround is clear the default alertsound and play one manually via PlaySound() when the monster becomes alerted.

Re: A_LookEx with LOF_NOJUMP flag jumps to See state regardl

PostPosted: Sat Jul 13, 2019 12:27 am
by Blue Shadow
Yeah, I noticed the SeeSound thing during my testing. I think you might want to create a new bug report for that, since it and the bug report in the OP are about two different things.

Re: A_LookEx with LOF_NOJUMP flag jumps to See state regardl

PostPosted: Sat Jul 13, 2019 3:57 am
by _mental_
So, what doesn't work here exactly? State switch can be avoided with LOF_NOJUMP flag. See sound can be disabled with LOF_NOSEESOUND flag.

Re: A_LookEx with LOF_NOJUMP flag jumps to See state regardl

PostPosted: Sat Jul 13, 2019 4:27 am
by Graf Zahl
Looks all correct to me.