Make Metal Sonic's jet fume opaque when re-emerging from water

This commit is contained in:
lachwright 2019-12-31 17:26:35 +08:00
parent 939814d479
commit 10b71d40b8

View file

@ -11250,7 +11250,10 @@ static void P_DoMetalJetFume(player_t *player, mobj_t *fume)
if (panim == PA_WALK)
{
if (stat != fume->info->spawnstate)
{
fume->threshold = 0;
P_SetMobjState(fume, fume->info->spawnstate);
}
return;
}
}
@ -11281,6 +11284,12 @@ static void P_DoMetalJetFume(player_t *player, mobj_t *fume)
if (underwater)
{
fume->frame = (fume->frame & FF_FRAMEMASK) | FF_ANIMATE | (P_RandomRange(0, 9) * FF_TRANS10);
fume->threshold = 1;
}
else if (fume->threshold)
{
fume->frame = (fume->frame & FF_FRAMEMASK) | fume->state->frame;
fume->threshold = 0;
}
}