cleanup abs warnings

This commit is contained in:
Alam Ed Arias 2016-03-30 00:22:12 -04:00
parent a3c01ea6c2
commit 0fe6ee5339
4 changed files with 6 additions and 6 deletions

View file

@ -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 = abs((tails->angle - sonic->angle))>>16;
cmd->angleturn = (angle_t)((tails->angle - sonic->angle))>>16;
if (sonic->angle < tails->angle)
cmd->angleturn = -cmd->angleturn;
} else if (dist > FixedMul(512*FRACUNIT, tails->scale))

View file

@ -408,7 +408,7 @@ static int libd_drawPaddedNum(lua_State *L)
HUDONLY
x = luaL_checkinteger(L, 1);
y = luaL_checkinteger(L, 2);
num = abs(luaL_checkinteger(L, 3));
num = labs(luaL_checkinteger(L, 3));
digits = luaL_optinteger(L, 4, 2);
flags = luaL_optinteger(L, 5, 0);
flags &= ~V_PARAMMASK; // Don't let crashes happen.

View file

@ -2507,8 +2507,8 @@ isblocking:
climbangle += (ANGLE_90 * (whichside ? -1 : 1));
if (((!slidemo->player->climbing && abs((slidemo->angle - ANGLE_90 - climbline)) < ANGLE_45)
|| (slidemo->player->climbing == 1 && abs((slidemo->angle - climbline)) < ANGLE_135))
if (((!slidemo->player->climbing && (angle_t)((slidemo->angle - ANGLE_90 - climbline)) < ANGLE_45)
|| (slidemo->player->climbing == 1 && (angle_t)((slidemo->angle - climbline)) < ANGLE_135))
&& P_IsClimbingValid(slidemo->player, climbangle))
{
slidemo->angle = climbangle;

View file

@ -7899,9 +7899,9 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
if (player == &players[consoleplayer])
{
if (focusangle >= localangle)
localangle += abs((focusangle - localangle))>>5;
localangle += (angle_t)((focusangle - localangle))>>5;
else
localangle -= abs((focusangle - localangle))>>5;
localangle -= (angle_t)((focusangle - localangle))>>5;
}
}
else if (P_AnalogMove(player)) // Analog