Page 1 of 1

A_LookEx with LOF_NOJUMP flag jumps to See state regardless?

Posted: Sun Jun 23, 2019 9: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 all

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

Posted: Sun Jun 23, 2019 5: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

Posted: Fri Jul 12, 2019 3: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 all

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

Posted: Fri Jul 12, 2019 11:27 pm
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

Posted: Sat Jul 13, 2019 2: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

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