From ffa9a4e056a7ad2117eca8155285931f92f13cd4 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Fri, 2 Oct 2015 13:45:51 +0100 Subject: [PATCH 1/2] Removed the removal of SF_SUPER from skins other than Sonic # Conflicts: # src/r_things.c --- src/r_things.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/r_things.c b/src/r_things.c index 2a3f8e771..bdc6c4760 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -2698,9 +2698,6 @@ next_token: } free(buf2); - // Not in vanilla, you don't. - skin->flags &= ~SF_SUPER; - lump++; // if no sprite defined use spirte just after this one if (skin->sprite[0] == '\0') { From fc35c8557e97e64c17718f5ceee7d8f0190b9246 Mon Sep 17 00:00:00 2001 From: Inuyasha Date: Sun, 28 Feb 2016 18:19:46 -0800 Subject: [PATCH 2/2] Super color code cleaning, speed 50%, nothing special --- src/g_game.c | 6 ++---- src/p_user.c | 23 +++++------------------ 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/src/g_game.c b/src/g_game.c index 72cfe4a57..dda8793bb 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 da65b7cb4..89b530c35 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))