mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00:00
engine: server: explicitly cast literals to floats
This commit is contained in:
parent
edf3fcd398
commit
531c6cc375
@ -581,7 +581,6 @@ qboolean SV_RunGameFrame( void )
|
|||||||
{
|
{
|
||||||
double fps = (1.0 / (double)( sv_fps.value - 0.01 )); // FP issues
|
double fps = (1.0 / (double)( sv_fps.value - 0.01 )); // FP issues
|
||||||
int numFrames = 0;
|
int numFrames = 0;
|
||||||
static double oldtime;
|
|
||||||
|
|
||||||
while( sv.time_residual >= fps )
|
while( sv.time_residual >= fps )
|
||||||
{
|
{
|
||||||
|
@ -243,7 +243,7 @@ float SV_VecToYaw( const vec3_t src )
|
|||||||
}
|
}
|
||||||
else
|
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;
|
if( yaw < 0 ) yaw += 360.0f;
|
||||||
}
|
}
|
||||||
return yaw;
|
return yaw;
|
||||||
@ -570,4 +570,4 @@ void SV_MoveToOrigin( edict_t *ent, const vec3_t pflGoal, float dist, int iMoveT
|
|||||||
SV_FlyDirection( ent, vecDist );
|
SV_FlyDirection( ent, vecDist );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -373,7 +373,7 @@ float SV_RecursiveWaterLevel( vec3_t origin, float out, float in, int count )
|
|||||||
vec3_t point;
|
vec3_t point;
|
||||||
float offset;
|
float offset;
|
||||||
|
|
||||||
offset = ((out - in) * 0.5) + in;
|
offset = ((out - in) * 0.5f) + in;
|
||||||
if( ++count > 5 ) return offset;
|
if( ++count > 5 ) return offset;
|
||||||
|
|
||||||
VectorSet( point, origin[0], origin[1], origin[2] + offset );
|
VectorSet( point, origin[0], origin[1], origin[2] + offset );
|
||||||
@ -1375,7 +1375,7 @@ void SV_CheckWaterTransition( edict_t *ent )
|
|||||||
{
|
{
|
||||||
// just crossed into water
|
// just crossed into water
|
||||||
SV_StartSound( ent, CHAN_AUTO, "player/pl_wade1.wav", 1.0f, ATTN_NORM, 0, 100 );
|
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;
|
ent->v.watertype = cont;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user