mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-26 04:11:18 +00:00
the abs() is necessary; force unsigned shift and signed result
This commit is contained in:
parent
9286e30366
commit
3812b6bc20
2 changed files with 2 additions and 2 deletions
|
@ -4336,7 +4336,7 @@ void G_GhostTicker(void)
|
|||
{
|
||||
case GHC_SUPER: // Super Sonic (P_DoSuperStuff)
|
||||
g->mo->color = SKINCOLOR_SUPER1;
|
||||
g->mo->color += ( ( ( leveltime >> 1 ) % 9) - 4);
|
||||
g->mo->color += abs( ( (signed)( (unsigned)leveltime >> 1 ) % 9) - 4);
|
||||
break;
|
||||
case GHC_INVINCIBLE: // Mario invincibility (P_CheckInvincibilityTimer)
|
||||
g->mo->color = (UINT8)(leveltime % MAXSKINCOLORS);
|
||||
|
|
|
@ -3449,7 +3449,7 @@ static void P_DoSuperStuff(player_t *player)
|
|||
case 2: /* Knux */ player->mo->color = SKINCOLOR_KSUPER1; break;
|
||||
default: /* everyone */ player->mo->color = SKINCOLOR_SUPER1; break;
|
||||
}
|
||||
player->mo->color += ( ( ( leveltime >> 1 ) % 9) - 4);
|
||||
player->mo->color += abs( ( (signed)( (unsigned)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