2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-26 03:39:16 +01:00

engine: server: explicitly cast literals to floats

This commit is contained in:
Alibek Omarov 2019-10-06 06:51:04 +03:00
parent edf3fcd398
commit 531c6cc375
3 changed files with 4 additions and 5 deletions

View File

@ -581,7 +581,6 @@ qboolean SV_RunGameFrame( void )
{
double fps = (1.0 / (double)( sv_fps.value - 0.01 )); // FP issues
int numFrames = 0;
static double oldtime;
while( sv.time_residual >= fps )
{

View File

@ -243,7 +243,7 @@ float SV_VecToYaw( const vec3_t src )
}
else
{
yaw = (int)( atan2( src[1], src[0] ) * 180.0f / M_PI );
yaw = (int)( atan2( src[1], src[0] ) * 180.0f / M_PI_F );
if( yaw < 0 ) yaw += 360.0f;
}
return yaw;
@ -570,4 +570,4 @@ void SV_MoveToOrigin( edict_t *ent, const vec3_t pflGoal, float dist, int iMoveT
SV_FlyDirection( ent, vecDist );
}
}
}
}

View File

@ -373,7 +373,7 @@ float SV_RecursiveWaterLevel( vec3_t origin, float out, float in, int count )
vec3_t point;
float offset;
offset = ((out - in) * 0.5) + in;
offset = ((out - in) * 0.5f) + in;
if( ++count > 5 ) return offset;
VectorSet( point, origin[0], origin[1], origin[2] + offset );
@ -1375,7 +1375,7 @@ void SV_CheckWaterTransition( edict_t *ent )
{
// just crossed into water
SV_StartSound( ent, CHAN_AUTO, "player/pl_wade1.wav", 1.0f, ATTN_NORM, 0, 100 );
ent->v.velocity[2] *= 0.5;
ent->v.velocity[2] *= 0.5f;
}
ent->v.watertype = cont;