summaryrefslogtreecommitdiff
path: root/src/heretic
diff options
context:
space:
mode:
Diffstat (limited to 'src/heretic')
-rw-r--r--src/heretic/g_game.c6
-rw-r--r--src/heretic/p_enemy.c12
-rw-r--r--src/heretic/p_inter.c2
-rw-r--r--src/heretic/p_spec.h2
-rw-r--r--src/heretic/sb_bar.c2
5 files changed, 17 insertions, 7 deletions
diff --git a/src/heretic/g_game.c b/src/heretic/g_game.c
index 5139c950..c48b9c8e 100644
--- a/src/heretic/g_game.c
+++ b/src/heretic/g_game.c
@@ -65,7 +65,7 @@ void D_AdvanceDemo(void);
struct
{
- mobjtype_t type;
+ int type; // mobjtype_t
int speed[2];
} MonsterMissileInfo[] = {
{ MT_IMPBALL, { 10, 20 } },
@@ -666,8 +666,8 @@ void G_DoLoadLevel(void)
joyxmove = joyymove = 0;
mousex = mousey = 0;
sendpause = sendsave = paused = false;
- memset(mousebuttons, 0, sizeof(mousebuttons));
- memset(joybuttons, 0, sizeof(joybuttons));
+ memset(mousearray, 0, sizeof(mousearray));
+ memset(joyarray, 0, sizeof(joyarray));
if (testcontrols)
{
diff --git a/src/heretic/p_enemy.c b/src/heretic/p_enemy.c
index c2864668..079a25eb 100644
--- a/src/heretic/p_enemy.c
+++ b/src/heretic/p_enemy.c
@@ -435,7 +435,10 @@ void P_NewChaseDir(mobj_t * actor)
}
else
{
- for (tdir = DI_SOUTHEAST; tdir != DI_EAST-1; tdir--)
+ // Iterate over all movedirs.
+ tdir = DI_SOUTHEAST;
+
+ for (;;)
{
if (tdir != turnaround)
{
@@ -443,6 +446,13 @@ void P_NewChaseDir(mobj_t * actor)
if (P_TryWalk(actor))
return;
}
+
+ if (tdir == DI_EAST)
+ {
+ break;
+ }
+
+ --tdir;
}
}
diff --git a/src/heretic/p_inter.c b/src/heretic/p_inter.c
index 0e7b24b8..a68586ee 100644
--- a/src/heretic/p_inter.c
+++ b/src/heretic/p_inter.c
@@ -164,7 +164,7 @@ boolean P_GiveAmmo(player_t * player, ammotype_t ammo, int count)
{
return (false);
}
- if (ammo < 0 || ammo > NUMAMMO)
+ if ((unsigned int) ammo > NUMAMMO)
{
I_Error("P_GiveAmmo: bad type %i", ammo);
}
diff --git a/src/heretic/p_spec.h b/src/heretic/p_spec.h
index 7f5e2c43..550cd883 100644
--- a/src/heretic/p_spec.h
+++ b/src/heretic/p_spec.h
@@ -49,7 +49,7 @@ typedef struct
//
typedef struct
{
- boolean istexture; // if false, it's a flat
+ int istexture; // if false, it's a flat
char endname[9];
char startname[9];
int speed;
diff --git a/src/heretic/sb_bar.c b/src/heretic/sb_bar.c
index 4db3094b..3de57cb1 100644
--- a/src/heretic/sb_bar.c
+++ b/src/heretic/sb_bar.c
@@ -1188,7 +1188,7 @@ static void CheatArtifact3Func(player_t * player, Cheat_t * cheat)
char args[2];
int i;
int j;
- artitype_t type;
+ int type;
int count;
cht_GetParam(cheat->seq, args);