summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author/dev/humancontroller <devhc@example.com>2015-02-02 00:17:33 +0100
committer/dev/humancontroller <devhc@example.com>2017-02-07 17:34:59 +0100
commit3bcfe65c2d937b195c83023ae58e99f9569ebe1b (patch)
treef31df0650abf3ebd3ca7bb2a0024b2086145c3f8 /src
parent8ab2f0b3081f53692836035aedd2546b607decc8 (diff)
fix some usages of abs(), part 2: potentially gamelogic-changing changes
detected by Clang
Diffstat (limited to 'src')
-rw-r--r--src/game/g_buildable.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c
index 7706b598..136794e0 100644
--- a/src/game/g_buildable.c
+++ b/src/game/g_buildable.c
@@ -2237,9 +2237,9 @@ qboolean HMGTurret_TrackEnemy( gentity_t *self )
vectoangles( dirToTarget, self->turretAim );
//fire if target is within accuracy
- return ( abs( angularDiff[ YAW ] ) - MGTURRET_ANGULARSPEED <=
+ return ( fabs( angularDiff[ YAW ] ) - MGTURRET_ANGULARSPEED <=
MGTURRET_ACCURACY_TO_FIRE ) &&
- ( abs( angularDiff[ PITCH ] ) - MGTURRET_ANGULARSPEED <=
+ ( fabs( angularDiff[ PITCH ] ) - MGTURRET_ANGULARSPEED <=
MGTURRET_ACCURACY_TO_FIRE );
}