diff --git a/src/g_newdm.c b/src/g_newdm.c index 8afb900..92fc7a8 100644 --- a/src/g_newdm.c +++ b/src/g_newdm.c @@ -359,7 +359,7 @@ body_think(edict_t *self) { float r; - if (abs(self->ideal_yaw - anglemod(self->s.angles[YAW])) < 2) + if (fabsf(self->ideal_yaw - anglemod(self->s.angles[YAW])) < 2) { if (self->timestamp < level.time) { diff --git a/src/monster/misc/move.c b/src/monster/misc/move.c index 7f3fdc6..78041f8 100644 --- a/src/monster/misc/move.c +++ b/src/monster/misc/move.c @@ -714,7 +714,7 @@ SV_NewChaseDir(edict_t *actor, edict_t *enemy, float dist) } /* try other directions */ - if (((rand() & 3) & 1) || (abs(deltay) > abs(deltax))) + if (((rand() & 3) & 1) || (fabsf(deltay) > fabsf(deltax))) { tdir = d[1]; d[1] = d[2]; diff --git a/src/monster/stalker/stalker.c b/src/monster/stalker/stalker.c index 65c370a..a53e919 100644 --- a/src/monster/stalker/stalker.c +++ b/src/monster/stalker/stalker.c @@ -117,7 +117,7 @@ stalker_ok_to_transition(edict_t *self) return false; } - if (abs(end_height + margin - trace.endpos[2]) > 8) + if (fabsf(end_height + margin - trace.endpos[2]) > 8) { return false; } @@ -134,7 +134,7 @@ stalker_ok_to_transition(edict_t *self) return false; } - if (abs(end_height + margin - trace.endpos[2]) > 8) + if (fabsf(end_height + margin - trace.endpos[2]) > 8) { return false; } @@ -150,7 +150,7 @@ stalker_ok_to_transition(edict_t *self) return false; } - if (abs(end_height + margin - trace.endpos[2]) > 8) + if (fabsf(end_height + margin - trace.endpos[2]) > 8) { return false; } @@ -166,7 +166,7 @@ stalker_ok_to_transition(edict_t *self) return false; } - if (abs(end_height + margin - trace.endpos[2]) > 8) + if (fabsf(end_height + margin - trace.endpos[2]) > 8) { return false; } @@ -972,7 +972,7 @@ stalker_do_pounce(edict_t *self, vec3_t dest) /* make sure we're pointing in that direction 15deg margin of error. */ vectoangles2(dist, jumpAngles); - if (abs(jumpAngles[YAW] - self->s.angles[YAW]) > 45) + if (fabsf(jumpAngles[YAW] - self->s.angles[YAW]) > 45) { return false; /* not facing the player... */ }