summaryrefslogtreecommitdiff
path: root/src/hexen/p_enemy.c
diff options
context:
space:
mode:
authorSimon Howard2014-03-24 00:18:33 -0400
committerSimon Howard2014-03-24 00:18:33 -0400
commit19466db77813385693cf78b8bc7d97b58dd2b14c (patch)
tree47a31cfb8ac8ae0dadacdfa6906a0abb4f4d5c91 /src/hexen/p_enemy.c
parent42faefce1fd03f5d613bf709d3c14925ee560064 (diff)
downloadchocolate-doom-19466db77813385693cf78b8bc7d97b58dd2b14c.tar.gz
chocolate-doom-19466db77813385693cf78b8bc7d97b58dd2b14c.tar.bz2
chocolate-doom-19466db77813385693cf78b8bc7d97b58dd2b14c.zip
Fix various Clang compiler warnings.
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;
}
}