mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 17:22:12 +00:00
Super color code cleaning, speed 50%, nothing special
This commit is contained in:
parent
ffa9a4e056
commit
fc35c8557e
2 changed files with 7 additions and 22 deletions
|
@ -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);
|
||||
|
|
23
src/p_user.c
23
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))
|
||||
|
|
Loading…
Reference in a new issue