summaryrefslogtreecommitdiff
path: root/src/hexen/p_enemy.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hexen/p_enemy.c')
-rw-r--r--src/hexen/p_enemy.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/hexen/p_enemy.c b/src/hexen/p_enemy.c
index da987f16..6c9ca194 100644
--- a/src/hexen/p_enemy.c
+++ b/src/hexen/p_enemy.c
@@ -430,7 +430,9 @@ void P_NewChaseDir(mobj_t * actor)
}
else
{
- for (tdir = DI_SOUTHEAST; tdir != DI_EAST-1; tdir--)
+ tdir = DI_SOUTHEAST;
+
+ for (;;)
{
if (tdir != turnaround)
{
@@ -438,6 +440,13 @@ void P_NewChaseDir(mobj_t * actor)
if (P_TryWalk(actor))
return;
}
+
+ if (tdir == DI_EAST)
+ {
+ break;
+ }
+
+ --tdir;
}
}