mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-10 15:22:20 +00:00
switich to do the angle math in signed, then run it thur abs()
This commit is contained in:
parent
7e07d2d77a
commit
b169529dfd
3 changed files with 5 additions and 5 deletions
|
@ -49,7 +49,7 @@ static inline void B_BuildTailsTiccmd(mobj_t *sonic, mobj_t *tails, ticcmd_t *cm
|
|||
if (sonic->player->pflags & (PF_MACESPIN|PF_ITEMHANG))
|
||||
{
|
||||
cmd->forwardmove = sonic->player->cmd.forwardmove;
|
||||
cmd->angleturn = (angle_t)((tails->angle - sonic->angle))>>16;
|
||||
cmd->angleturn = abs((signed)(tails->angle - sonic->angle))>>16;
|
||||
if (sonic->angle < tails->angle)
|
||||
cmd->angleturn = -cmd->angleturn;
|
||||
} else if (dist > FixedMul(512*FRACUNIT, tails->scale))
|
||||
|
|
|
@ -2507,8 +2507,8 @@ isblocking:
|
|||
|
||||
climbangle += (ANGLE_90 * (whichside ? -1 : 1));
|
||||
|
||||
if (((!slidemo->player->climbing && (angle_t)((slidemo->angle - ANGLE_90 - climbline)) < ANGLE_45)
|
||||
|| (slidemo->player->climbing == 1 && (angle_t)((slidemo->angle - climbline)) < ANGLE_135))
|
||||
if (((!slidemo->player->climbing && abs((signed)(slidemo->angle - ANGLE_90 - climbline)) < ANGLE_45)
|
||||
|| (slidemo->player->climbing == 1 && abs((signed)(slidemo->angle - climbline)) < ANGLE_135))
|
||||
&& P_IsClimbingValid(slidemo->player, climbangle))
|
||||
{
|
||||
slidemo->angle = climbangle;
|
||||
|
|
|
@ -7899,9 +7899,9 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
if (player == &players[consoleplayer])
|
||||
{
|
||||
if (focusangle >= localangle)
|
||||
localangle += (angle_t)((focusangle - localangle))>>5;
|
||||
localangle += abs((signed)(focusangle - localangle))>>5;
|
||||
else
|
||||
localangle -= (angle_t)((focusangle - localangle))>>5;
|
||||
localangle -= abs((signed)(focusangle - localangle))>>5;
|
||||
}
|
||||
}
|
||||
else if (P_AnalogMove(player)) // Analog
|
||||
|
|
Loading…
Reference in a new issue