Unbreak the build against Clang 3.5.0.

Requested by:	antoine
This commit is contained in:
Alexey Dokuchaev 2014-11-30 15:08:16 +00:00
parent a5ec75082c
commit 050d78cd43
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=373666

View File

@ -40,6 +40,41 @@
else if(cmds == 0 && cvars == 1) cmd = cvar;
else cmd = NULL;
--- src/cl_ents.c.orig 2007-12-28 07:25:47.000000000 +0800
+++ src/cl_ents.c 2014-11-30 22:57:36.000000000 +0800
@@ -168,9 +168,9 @@ void CL_DeltaEntity(frame_t *frame, int
|| state->modelindex2 != ent->current.modelindex2
|| state->modelindex3 != ent->current.modelindex3
|| state->modelindex4 != ent->current.modelindex4
- || abs(state->origin[0] - ent->current.origin[0]) > 512
- || abs(state->origin[1] - ent->current.origin[1]) > 512
- || abs(state->origin[2] - ent->current.origin[2]) > 512
+ || fabsf(state->origin[0] - ent->current.origin[0]) > 512
+ || fabsf(state->origin[1] - ent->current.origin[1]) > 512
+ || fabsf(state->origin[2] - ent->current.origin[2]) > 512
|| state->event == EV_PLAYER_TELEPORT
|| state->event == EV_OTHER_TELEPORT
){
@@ -912,7 +912,7 @@ void CL_CalcViewValues(void){
ops = &oldframe->playerstate;
// see if the player entity was teleported this frame
- if(fabs(ops->pmove.origin[0] - ps->pmove.origin[0]) > 256 * 8
+ if(abs(ops->pmove.origin[0] - ps->pmove.origin[0]) > 256 * 8
|| abs(ops->pmove.origin[1] - ps->pmove.origin[1]) > 256 * 8
|| abs(ops->pmove.origin[2] - ps->pmove.origin[2]) > 256 * 8)
ops = ps; // don't interpolate
--- src/vanctf/m_move.c.orig 2007-12-28 07:25:45.000000000 +0800
+++ src/vanctf/m_move.c 2014-11-30 22:58:47.000000000 +0800
@@ -370,7 +370,7 @@ void SV_NewChaseDir(edict_t *actor, edic
}
// 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];
d[2] = tdir;
--- src/qmass/g_cmds.c.orig 2007-12-28 07:25:44.000000000 +0800
+++ src/qmass/g_cmds.c 2013-09-05 14:53:30.000000000 +0800
@@ -724,7 +724,7 @@ void Cmd_Say_f(edict_t *ent, qboolean te