- Fixed A_Wander calling --movecount too soon.

- Also added NORANDOMTURN flag accountability for A_Wander.
This commit is contained in:
MajorCooke 2016-02-09 22:45:59 -06:00
parent 3399ed60e0
commit 4fcc9efea0
1 changed files with 1 additions and 4 deletions

View File

@ -2111,10 +2111,7 @@ void A_Wander(AActor *self, int flags)
} }
} }
if (self->movecount >= 0) if ((--self->movecount < 0 && !(flags & CHF_NORANDOMTURN)) || (!P_Move(self) && !(flags & CHF_STOPIFBLOCKED)))
self->movecount--;
if ((!(flags & CHF_NORANDOMTURN) && self->movecount < 0) || !P_Move(self))
{ {
P_RandomChaseDir(self); P_RandomChaseDir(self);
self->movecount += 5; self->movecount += 5;