mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-29 16:24:16 +00:00
engine: reset cheat cvars on remote games
This commit is contained in:
parent
9cbf5ab6a6
commit
d9a245dcb5
@ -1051,6 +1051,9 @@ void CL_SendConnectPacket( void )
|
||||
input_devices = IN_CollectInputDevices();
|
||||
IN_LockInputDevices( true );
|
||||
|
||||
Cvar_SetCheatState();
|
||||
Cvar_FullSet( "sv_cheats", "0", FCVAR_READ_ONLY | FCVAR_SERVER );
|
||||
|
||||
Info_SetValueForKey( protinfo, "d", va( "%d", input_devices ), sizeof( protinfo ) );
|
||||
Info_SetValueForKey( protinfo, "v", XASH_VERSION, sizeof( protinfo ) );
|
||||
Info_SetValueForKey( protinfo, "b", va( "%d", Q_buildnum() ), sizeof( protinfo ) );
|
||||
|
@ -441,6 +441,7 @@ extern convar_t deathmatch;
|
||||
extern convar_t hostname;
|
||||
extern convar_t skill;
|
||||
extern convar_t coop;
|
||||
extern convar_t sv_cheats;
|
||||
|
||||
extern convar_t *sv_pausable; // allows pause in multiplayer
|
||||
extern convar_t *sv_check_errors;
|
||||
|
@ -877,6 +877,9 @@ qboolean SV_SpawnServer( const char *mapname, const char *startspot, qboolean ba
|
||||
if( !SV_InitGame( ))
|
||||
return false;
|
||||
|
||||
// unlock sv_cheats in local game
|
||||
ClearBits( sv_cheats.flags, FCVAR_READ_ONLY );
|
||||
|
||||
svs.initialized = true;
|
||||
Log_Open();
|
||||
Log_Printf( "Loading map \"%s\"\n", mapname );
|
||||
|
Loading…
x
Reference in New Issue
Block a user