Have super sparks scale with the player

Fixes https://mb.srb2.org/showthread.php?t=40279

Should work fine, but do keep in mind that this fix is untested.
This commit is contained in:
Wolfy 2015-02-20 17:25:27 -06:00 committed by Alam Ed Arias
parent 2609745b51
commit 48d759123d

View file

@ -3330,6 +3330,7 @@ firenormal:
// //
static void P_DoSuperStuff(player_t *player) static void P_DoSuperStuff(player_t *player)
{ {
mobj_t *spark;
ticcmd_t *cmd = &player->cmd; ticcmd_t *cmd = &player->cmd;
if (player->mo->state >= &states[S_PLAY_SUPERTRANS1] && player->mo->state <= &states[S_PLAY_SUPERTRANS9]) if (player->mo->state >= &states[S_PLAY_SUPERTRANS1] && player->mo->state <= &states[S_PLAY_SUPERTRANS9])
return; // don't do anything right now, we're in the middle of transforming! return; // don't do anything right now, we're in the middle of transforming!
@ -3396,7 +3397,11 @@ static void P_DoSuperStuff(player_t *player)
if ((cmd->forwardmove != 0 || cmd->sidemove != 0 || player->pflags & (PF_CARRIED|PF_ROPEHANG|PF_ITEMHANG|PF_MACESPIN)) if ((cmd->forwardmove != 0 || cmd->sidemove != 0 || player->pflags & (PF_CARRIED|PF_ROPEHANG|PF_ITEMHANG|PF_MACESPIN))
&& !(leveltime % TICRATE) && (player->mo->momx || player->mo->momy)) && !(leveltime % TICRATE) && (player->mo->momx || player->mo->momy))
P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_SUPERSPARK); {
spark = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_SUPERSPARK);
spark->destscale = player->mo->scale;
P_SetScale(spark, player->mo->scale);
}
G_GhostAddColor(GHC_SUPER); G_GhostAddColor(GHC_SUPER);