From 011e2b714ad255133bf49f6621c21abd07c51107 Mon Sep 17 00:00:00 2001 From: helixhorned Date: Wed, 12 Sep 2012 09:46:21 +0000 Subject: [PATCH] Replace some literal statnums with the corrensponding STAT_... git-svn-id: https://svn.eduke32.com/eduke32@3011 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/actors.c | 2 +- polymer/eduke32/source/game.c | 5 +++-- polymer/eduke32/source/player.c | 8 ++++---- polymer/eduke32/source/premap.c | 2 +- polymer/eduke32/source/sector.c | 2 +- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/polymer/eduke32/source/actors.c b/polymer/eduke32/source/actors.c index f9a28629b..0f1bb486f 100644 --- a/polymer/eduke32/source/actors.c +++ b/polymer/eduke32/source/actors.c @@ -668,7 +668,7 @@ void Sect_ClearInterpolation(int32_t sectnum) static int32_t move_fixed_sprite(int32_t j, int32_t pivotspr, int32_t daang) { if ((FIXSPR_STATNUMP(sprite[j].statnum) || - ((sprite[j].statnum==1 || sprite[j].statnum==2) && (ActorType[sprite[j].picnum]&4))) + ((sprite[j].statnum==STAT_ACTOR || sprite[j].statnum==STAT_ZOMBIEACTOR) && (ActorType[sprite[j].picnum]&4))) && actor[j].t_data[7]==(0x18190000|pivotspr)) { rotatepoint(0,0, actor[j].t_data[8],actor[j].t_data[9], daang&2047, &sprite[j].x,&sprite[j].y); diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index 7ed683e03..4ecbb20a5 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -6356,7 +6356,7 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t oura, int32_t smoo case TRIPBOMB__STATIC: continue; case FORCESPHERE__STATIC: - if (t->statnum == 5) + if (t->statnum == STAT_MISC) { int16_t sqa,sqb; @@ -6784,7 +6784,8 @@ skip: { int32_t daz; - if ((sector[sect].lotag&0xff) > 2 || s->statnum == STAT_PROJECTILE || s->statnum == 5 || s->picnum == DRONE || s->picnum == COMMANDER) + if ((sector[sect].lotag&0xff) > 2 || s->statnum == STAT_PROJECTILE || s->statnum == STAT_MISC + || s->picnum == DRONE || s->picnum == COMMANDER) daz = sector[sect].floorz; else daz = actor[i].floorz; diff --git a/polymer/eduke32/source/player.c b/polymer/eduke32/source/player.c index 0f9ebb7d2..73a391ebf 100644 --- a/polymer/eduke32/source/player.c +++ b/polymer/eduke32/source/player.c @@ -517,7 +517,7 @@ int32_t A_Shoot(int32_t i, int32_t atwith) k = headspritesect[wall[hit.wall].nextsector]; while (k >= 0) { - if (sprite[k].statnum == 3 && sprite[k].lotag == SE_13_EXPLOSIVE) + if (sprite[k].statnum == STAT_EFFECTOR && sprite[k].lotag == SE_13_EXPLOSIVE) return -1; k = nextspritesect[k]; } @@ -862,7 +862,7 @@ int32_t A_Shoot(int32_t i, int32_t atwith) l = headspritesect[wall[hit.wall].nextsector]; while (l >= 0) { - if (sprite[l].statnum == 3 && sprite[l].lotag == SE_13_EXPLOSIVE) + if (sprite[l].statnum == STAT_EFFECTOR && sprite[l].lotag == SE_13_EXPLOSIVE) goto DOSKIPBULLETHOLE; l = nextspritesect[l]; } @@ -1102,7 +1102,7 @@ DOSKIPBULLETHOLE: k = headspritesect[wall[hit.wall].nextsector]; while (k >= 0) { - if (sprite[k].statnum == 3 && sprite[k].lotag == SE_13_EXPLOSIVE) + if (sprite[k].statnum == STAT_EFFECTOR && sprite[k].lotag == SE_13_EXPLOSIVE) return -1; k = nextspritesect[k]; } @@ -1354,7 +1354,7 @@ DOSKIPBULLETHOLE: l = headspritesect[wall[hit.wall].nextsector]; while (l >= 0) { - if (sprite[l].statnum == 3 && sprite[l].lotag == SE_13_EXPLOSIVE) + if (sprite[l].statnum == STAT_EFFECTOR && sprite[l].lotag == SE_13_EXPLOSIVE) goto SKIPBULLETHOLE; l = nextspritesect[l]; } diff --git a/polymer/eduke32/source/premap.c b/polymer/eduke32/source/premap.c index 017feea79..fe6f3b898 100644 --- a/polymer/eduke32/source/premap.c +++ b/polymer/eduke32/source/premap.c @@ -1059,7 +1059,7 @@ static void premap_setup_fixed_sprites(void) // TRIPBOMB uses t_data[7] for its own purposes. Wouldn't be // too useful with moving sectors anyway if ((FIXSPR_STATNUMP(sprite[j].statnum) && sprite[j].picnum!=TRIPBOMB) || - ((sprite[j].statnum==1 || sprite[j].statnum==2) && (ActorType[sprite[j].picnum]&4))) + ((sprite[j].statnum==STAT_ACTOR || sprite[j].statnum==STAT_ZOMBIEACTOR) && (ActorType[sprite[j].picnum]&4))) { pivot = i; if (sprite[i].lotag==0) diff --git a/polymer/eduke32/source/sector.c b/polymer/eduke32/source/sector.c index ab1d82bd3..fbde94ba5 100644 --- a/polymer/eduke32/source/sector.c +++ b/polymer/eduke32/source/sector.c @@ -1089,7 +1089,7 @@ void G_OperateActivators(int32_t low,int32_t snum) j = headspritesect[sprite[i].sectnum]; while (j >= 0) { - if (sprite[j].statnum == 3) switch (sprite[j].lotag) + if (sprite[j].statnum == STAT_EFFECTOR) switch (sprite[j].lotag) { case SE_36_PROJ_SHOOTER: case SE_31_FLOOR_RISE_FALL: