diff --git a/src/g_game.c b/src/g_game.c index 72cfe4a5..dda8793b 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -4326,10 +4326,8 @@ void G_GhostTicker(void) switch(g->color) { case GHC_SUPER: // Super Sonic (P_DoSuperStuff) - if (leveltime % 9 < 5) - g->mo->color = SKINCOLOR_SUPER1 + leveltime % 9; - else - g->mo->color = SKINCOLOR_SUPER1 + 9 - leveltime % 9; + g->mo->color = SKINCOLOR_SUPER1; + g->mo->color += abs( ( ( leveltime >> 1 ) % 9) - 4); break; case GHC_INVINCIBLE: // Mario invincibility (P_CheckInvincibilityTimer) g->mo->color = (UINT8)(leveltime % MAXSKINCOLORS); diff --git a/src/p_user.c b/src/p_user.c index da65b7cb..89b530c3 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -3442,27 +3442,14 @@ static void P_DoSuperStuff(player_t *player) player->mo->health--; } + // future todo: a skin option for this, and possibly more colors switch (player->skin) { - case 1: // Golden orange supertails. - if (leveltime % 9 < 5) - player->mo->color = SKINCOLOR_TSUPER1 + leveltime % 9; - else - player->mo->color = SKINCOLOR_TSUPER1 + 9 - leveltime % 9; - break; - case 2: // Pink superknux. - if (leveltime % 9 < 5) - player->mo->color = SKINCOLOR_KSUPER1 + leveltime % 9; - else - player->mo->color = SKINCOLOR_KSUPER1 + 9 - leveltime % 9; - break; - default: // Yousa yellow now! - if (leveltime % 9 < 5) - player->mo->color = SKINCOLOR_SUPER1 + leveltime % 9; - else - player->mo->color = SKINCOLOR_SUPER1 + 9 - leveltime % 9; - break; + case 1: /* Tails */ player->mo->color = SKINCOLOR_TSUPER1; break; + case 2: /* Knux */ player->mo->color = SKINCOLOR_KSUPER1; break; + default: /* everyone */ player->mo->color = SKINCOLOR_SUPER1; break; } + player->mo->color += abs( ( ( leveltime >> 1 ) % 9) - 4); 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))