using abs() on unsigned have no effect

This commit is contained in:
Alam Ed Arias 2016-03-30 20:17:09 -04:00
parent 51aa7692d8
commit 75f65c4d44
2 changed files with 2 additions and 2 deletions

View file

@ -4336,7 +4336,7 @@ void G_GhostTicker(void)
{
case GHC_SUPER: // Super Sonic (P_DoSuperStuff)
g->mo->color = SKINCOLOR_SUPER1;
g->mo->color += abs( ( ( leveltime >> 1 ) % 9) - 4);
g->mo->color += ( ( ( leveltime >> 1 ) % 9) - 4);
break;
case GHC_INVINCIBLE: // Mario invincibility (P_CheckInvincibilityTimer)
g->mo->color = (UINT8)(leveltime % MAXSKINCOLORS);

View file

@ -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 += abs( ( ( leveltime >> 1 ) % 9) - 4);
player->mo->color += ( ( ( 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))