Replace two missed literal numbers with SE_* enum labels.

git-svn-id: https://svn.eduke32.com/eduke32@4492 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2014-05-30 19:39:06 +00:00
parent 0900f4066c
commit 66f5b547cf
2 changed files with 12 additions and 49 deletions

View file

@ -4175,14 +4175,6 @@ ACTOR_STATIC void G_MoveActors(void)
int32_t p;
DukePlayer_t *ps;
// case GREENSLIME+1:
// case GREENSLIME+2:
// case GREENSLIME+3:
// case GREENSLIME+4:
// case GREENSLIME+5:
// case GREENSLIME+6:
// case GREENSLIME+7:
// #ifndef VOLUMEONE
if (!g_netServer && ud.multimode < 2)
{
@ -4886,22 +4878,6 @@ DETONATEB:
g_impactDamage<<2,
g_impactDamage<<2,
g_impactDamage<<2);
/*
j = headspritestat[STAT_EFFECTOR];
while(j>=0)
{
if( sprite[j].lotag == 3 )
Actor[j].t_data[4]=1;
else if(sprite[j].lotag == SE_12_LIGHT_SWITCH)
{
Actor[j].t_data[4] = 1;
sprite[j].lotag = 3;
sprite[j].owner = 0;
Actor[j].t_data[0] = s->shade;
}
j = nextspritestat[j];
}
*/
for (SPRITES_OF(STAT_STANDABLE, j))
{
@ -5937,7 +5913,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
if (j < 1024L)
{
if (st==6)
if (st==SE_6_SUBWAY)
if (sprite[s->owner].hitag&1)
t[4]=sc->extra; //Slow it down
t[3]++;
@ -6509,20 +6485,20 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
if (j >= 0)
{
int16_t sn;
if ((sc->lotag&0x8000) || actor[i].t_data[4])
x = -t[3];
else
x = t[3];
if (st == 9) x = -x;
if (st == SE_9_DOWN_OPEN_DOOR_LIGHTS)
x = -x;
for (SPRITES_OF(STAT_EFFECTOR, j))
{
if (sprite[j].lotag == st && sprite[j].hitag == sh)
{
sn = sprite[j].sectnum;
int32_t sn = sprite[j].sectnum;
m = sprite[j].shade;
wal = &wall[sector[sn].wallptr];

View file

@ -7242,14 +7242,6 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t oura, int32_t smoo
const int32_t i = t->owner;
const spritetype *const s = &sprite[i];
/*
if (A_CheckSpriteFlags(i, SFLAG_NULL))
{
t->xrepeat = t->yrepeat = 0;
continue;
}
*/
if (t->picnum < GREENSLIME || t->picnum > GREENSLIME+7)
switch (DYNAMICTILEMAP(t->picnum))
{
@ -7302,20 +7294,13 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t oura, int32_t smoo
case NEON5__STATIC:
case NEON6__STATIC:
continue;
//case GREENSLIME:
//case GREENSLIME+1:
//case GREENSLIME+2:
//case GREENSLIME+3:
//case GREENSLIME+4:
//case GREENSLIME+5:
//case GREENSLIME+6:
//case GREENSLIME+7:
// break;
default:
if (((t->cstat&16)) || (A_CheckEnemySprite(t) && t->extra > 0) || t->statnum == STAT_PLAYER)
// NOTE: wall-aligned sprites will never take on ceiling/floor shade...
if ((t->cstat&16) || (A_CheckEnemySprite(t) && t->extra > 0) || t->statnum == STAT_PLAYER)
continue;
}
// ... since this is not reached:
if (A_CheckSpriteFlags(t->owner, SFLAG_NOSHADE) || (t->cstat&CSTAT_SPRITE_NOSHADE))
l = sprite[t->owner].shade;
else
@ -7324,9 +7309,11 @@ void G_DoSpriteAnimations(int32_t ourx, int32_t oury, int32_t oura, int32_t smoo
l = sector[t->sectnum].ceilingshade;
else
l = sector[t->sectnum].floorshade;
if (l < -127) l = -127;
// if (l > 128) l = 127;
if (l < -127)
l = -127;
}
t->shade = l;
}