- handle tilenum access in movetransports_d.

This commit is contained in:
Christoph Oelckers 2022-12-30 00:47:09 +01:00
parent 91d864ac8f
commit b2b4d432fc

View file

@ -453,22 +453,19 @@ void movetransports_d(void)
if (warpspriteto)
{
if ((act2->flags1 & SFLAG_NOTELEPORT)) continue;
switch (act2->spr.picnum)
if (act2->GetClass() == DukePlayerOnWaterClass)
{
case DTILE_PLAYERONWATER:
if (sectlotag == 2)
if (sectlotag == ST_2_UNDERWATER)
{
act2->spr.cstat &= ~CSTAT_SPRITE_INVISIBLE;
break;
continue;
}
}
if (act2->GetClass() != DukeWaterBubbleClass)
{
if (act2->spr.statnum == STAT_MISC && !(sectlotag == ST_1_ABOVE_WATER || sectlotag == ST_2_UNDERWATER))
continue;
}
[[fallthrough]];
default:
if (act2->spr.statnum == 5 && !(sectlotag == 1 || sectlotag == 2))
break;
[[fallthrough]];
case DTILE_WATERBUBBLE:
if (sectlotag > 0)
{
auto k = spawn(act2, DukeWaterSplashClass);
@ -531,9 +528,6 @@ void movetransports_d(void)
ChangeActorSect(act2, Owner->sector());
break;
}
break;
}
}
}
break;
@ -723,7 +717,7 @@ void moveeffectors_d(void) //STATNUM 3
handle_se02(act);
break;
//Flashing sector lights after reactor DTILE_EXPLOSION2
//Flashing sector lights after reactor explosion
case SE_3_RANDOM_LIGHTS_AFTER_SHOT_OUT:
handle_se03(act);
break;