commit c78ca4cf4a5d95b9e0268f43539e61084cdebe9f
Author: David Carlier <devnexen@gmail.com>
AuthorDate: Sun Oct 1 09:25:51 2017 +0100
Commit: David Carlier <devnexen@gmail.com>
CommitDate: Mon Oct 2 21:09:22 2017 +0100
fixing a handful of abs calls parameter
---
src/doom/r_segs.c | 2 +-
src/hexen/a_action.c | 15 ++++++---------
2 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/src/doom/r_segs.c b/src/doom/r_segs.c
index 461aa4a4..06881a52 100644
--- a/src/doom/r_segs.c
+++ b/src/doom/r_segs.c
@@ -396,7 +396,7 @@ R_StoreWallRange
// calculate rw_distance for scale calculation
rw_normalangle = curline->angle + ANG90;
- offsetangle = abs(rw_normalangle-rw_angle1);
+ offsetangle = abs((int)rw_normalangle-(int)rw_angle1);
if (offsetangle > ANG90)
offsetangle = ANG90;
diff --git a/src/hexen/a_action.c b/src/hexen/a_action.c
index 21b9e85b..5755d04d 100644
--- a/src/hexen/a_action.c
+++ b/src/hexen/a_action.c
@@ -200,10 +200,9 @@ void A_PotteryCheck(mobj_t * actor)
if (!netgame)
{
pmo = players[consoleplayer].mo;
- if (P_CheckSight(actor, pmo) && (abs(R_PointToAngle2(pmo->x,
- pmo->y, actor->x,
- actor->y) -
- pmo->angle) <= ANG45))
+ if (P_CheckSight(actor, pmo)
+ && (abs((int)R_PointToAngle2(pmo->x, pmo->y, actor->x, actor->y)
+ - (int)pmo->angle) <= ANG45))
{ // Previous state (pottery bit waiting state)
P_SetMobjState(actor, actor->state - &states[0] - 1);
}
@@ -221,11 +220,9 @@ void A_PotteryCheck(mobj_t * actor)
continue;
}
pmo = players[i].mo;
- if (P_CheckSight(actor, pmo) && (abs(R_PointToAngle2(pmo->x,
- pmo->y,
- actor->x,
- actor->y) -
- pmo->angle) <= ANG45))
+ if (P_CheckSight(actor, pmo)
+ && (abs((int)R_PointToAngle2(pmo->x, pmo->y, actor->x, actor->y)
+ - (int)pmo->angle) <= ANG45))
{ // Previous state (pottery bit waiting state)
P_SetMobjState(actor, actor->state - &states[0] - 1);
return;