engine: server: even if user set non-integer value for cl_updaterate, clamp it to sv_minupdaterate
This commit is contained in:
parent
340a8b5e0c
commit
c5d4af802c
1 changed files with 3 additions and 6 deletions
|
@ -1900,11 +1900,8 @@ static void SV_UserinfoChanged( sv_client_t *cl )
|
||||||
|
|
||||||
if( COM_CheckString( val ))
|
if( COM_CheckString( val ))
|
||||||
{
|
{
|
||||||
if( Q_atoi( val ) != 0 )
|
float rate = Q_atoi( val );
|
||||||
{
|
cl->cl_updaterate = 1.0 / bound( sv_minupdaterate.value, rate, sv_maxupdaterate.value );
|
||||||
cl->cl_updaterate = 1.0 / bound( sv_minupdaterate.value, Q_atoi( val ), sv_maxupdaterate.value );
|
|
||||||
}
|
|
||||||
else cl->cl_updaterate = 0.0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// call prog code to allow overrides
|
// call prog code to allow overrides
|
||||||
|
|
Loading…
Add table
Reference in a new issue