mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-02 14:01:26 +00:00
sv_move.c: add explicit int cast to a float argument to abs().
Previously, the cast was implicit since abs() takes an int, so there is no change in behaviour. Suppresses a clang warning that we might want fabs(). git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1451 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
3d594fc4d4
commit
bb8debf18f
1 changed files with 1 additions and 1 deletions
|
@ -320,7 +320,7 @@ void 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) || abs((int)deltay)>abs((int)deltax)) // ericw -- explicit int cast to suppress clang suggestion to use fabsf
|
||||
{
|
||||
tdir=d[1];
|
||||
d[1]=d[2];
|
||||
|
|
Loading…
Reference in a new issue