mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 04:41:23 +00:00
turn these signed before abs-ing em
This commit is contained in:
parent
7be6dab8a6
commit
a10ac14462
2 changed files with 5 additions and 5 deletions
|
@ -2683,7 +2683,7 @@ void K_DriftDustHandling(mobj_t *spawner)
|
||||||
{
|
{
|
||||||
if (spawner->player->pflags & PF_SKIDDOWN)
|
if (spawner->player->pflags & PF_SKIDDOWN)
|
||||||
{
|
{
|
||||||
anglediff = abs(spawner->angle - spawner->player->frameangle);
|
anglediff = abs((signed)(spawner->angle - spawner->player->frameangle));
|
||||||
if (leveltime % 6 == 0)
|
if (leveltime % 6 == 0)
|
||||||
S_StartSound(spawner, sfx_screec); // repeated here because it doesn't always happen to be within the range when this is the case
|
S_StartSound(spawner, sfx_screec); // repeated here because it doesn't always happen to be within the range when this is the case
|
||||||
}
|
}
|
||||||
|
@ -2697,7 +2697,7 @@ void K_DriftDustHandling(mobj_t *spawner)
|
||||||
if (spawner->player->cmd.forwardmove < 0)
|
if (spawner->player->cmd.forwardmove < 0)
|
||||||
playerangle += ANGLE_180;
|
playerangle += ANGLE_180;
|
||||||
|
|
||||||
anglediff = abs(playerangle - R_PointToAngle2(0, 0, spawner->player->rmomx, spawner->player->rmomy));
|
anglediff = abs((signed)(playerangle - R_PointToAngle2(0, 0, spawner->player->rmomx, spawner->player->rmomy)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -2705,7 +2705,7 @@ void K_DriftDustHandling(mobj_t *spawner)
|
||||||
if (P_AproxDistance(spawner->momx, spawner->momy) < 5<<FRACBITS)
|
if (P_AproxDistance(spawner->momx, spawner->momy) < 5<<FRACBITS)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
anglediff = abs(spawner->angle - R_PointToAngle2(0, 0, spawner->momx, spawner->momy));
|
anglediff = abs((signed)(spawner->angle - R_PointToAngle2(0, 0, spawner->momx, spawner->momy)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (anglediff > ANGLE_180)
|
if (anglediff > ANGLE_180)
|
||||||
|
@ -7660,7 +7660,7 @@ static void K_drawLapStartAnim(void)
|
||||||
{
|
{
|
||||||
V_DrawFixedPatch((BASEVIDWIDTH/2 + (32*max(0, stplyr->kartstuff[k_lapanimation]-76)))*FRACUNIT,
|
V_DrawFixedPatch((BASEVIDWIDTH/2 + (32*max(0, stplyr->kartstuff[k_lapanimation]-76)))*FRACUNIT,
|
||||||
(48 - (32*max(0, progress-76))
|
(48 - (32*max(0, progress-76))
|
||||||
+ 4 - abs((leveltime % 8) - 4))*FRACUNIT,
|
+ 4 - abs((signed)((leveltime % 8) - 4)))*FRACUNIT,
|
||||||
FRACUNIT, V_HUDTRANS,
|
FRACUNIT, V_HUDTRANS,
|
||||||
kp_lapanim_hand[stplyr->kartstuff[k_laphand]-1], NULL);
|
kp_lapanim_hand[stplyr->kartstuff[k_laphand]-1], NULL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -6713,7 +6713,7 @@ static void P_MovePlayer(player_t *player)
|
||||||
if (player->mo->state != &states[S_KART_SPIN])
|
if (player->mo->state != &states[S_KART_SPIN])
|
||||||
P_SetPlayerMobjState(player->mo, S_KART_SPIN);
|
P_SetPlayerMobjState(player->mo, S_KART_SPIN);
|
||||||
|
|
||||||
if (speed == 1 && abs(player->mo->angle - player->frameangle) < ANGLE_22h)
|
if (speed == 1 && abs((signed)(player->mo->angle - player->frameangle)) < ANGLE_22h)
|
||||||
player->frameangle = player->mo->angle; // Face forward at the end of the animation
|
player->frameangle = player->mo->angle; // Face forward at the end of the animation
|
||||||
else
|
else
|
||||||
player->frameangle -= (ANGLE_11hh * speed);
|
player->frameangle -= (ANGLE_11hh * speed);
|
||||||
|
|
Loading…
Reference in a new issue