engine: server: remove duplicated sv_clienttrace check, use Cvar_DirectSet

This commit is contained in:
Alibek Omarov
2026-08-07 23:07:21 +05:00
parent c2cb4ed5b8
commit 28ed4e7930
2 changed files with 2 additions and 5 deletions

View File

@@ -1000,7 +1000,7 @@ qboolean SV_SpawnServer( const char *mapname, const char *startspot, qboolean ba
// force normal player collisions for single player
if( svs.maxclients == 1 )
Cvar_SetValue( "sv_clienttrace", 1 );
Cvar_DirectSet( &sv_clienttrace, "1" );
// copy gamemode into svgame.globals
svgame.globals->deathmatch = deathmatch.value;
@@ -1011,9 +1011,6 @@ qboolean SV_SpawnServer( const char *mapname, const char *startspot, qboolean ba
Cvar_DirectFullSet( &sv_background, sv.background ? "1" : "0", FCVAR_READ_ONLY );
Cvar_DirectFullSet( &cl_background, sv.background ? "1" : "0", FCVAR_READ_ONLY );
// force normal player collisions for single player
if( svs.maxclients == 1 ) Cvar_SetValue( "sv_clienttrace", 1 );
// allow loading maps from subdirectories, strip extension anyway
Q_strncpy( sv.name, mapname, sizeof( sv.name ));
COM_StripExtension( sv.name );

View File

@@ -713,7 +713,7 @@ static void SV_SetupMoveInterpolant( sv_client_t *cl )
if( sv_maxunlag.value != 0.0f )
{
if( sv_maxunlag.value < 0.0f )
Cvar_DirectSetValue( &sv_maxunlag, 0.0f );
Cvar_DirectSet( &sv_maxunlag, "0" );
latency = Q_min( latency, sv_maxunlag.value );
}