mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00:00
server: add sv_autosave cvar
This commit is contained in:
parent
f3e50b5500
commit
6557ac7fb4
@ -438,6 +438,7 @@ extern convar_t sv_uploadmax;
|
|||||||
extern convar_t sv_trace_messages;
|
extern convar_t sv_trace_messages;
|
||||||
extern convar_t sv_enttools_enable;
|
extern convar_t sv_enttools_enable;
|
||||||
extern convar_t sv_enttools_maxfire;
|
extern convar_t sv_enttools_maxfire;
|
||||||
|
extern convar_t sv_autosave;
|
||||||
extern convar_t deathmatch;
|
extern convar_t deathmatch;
|
||||||
extern convar_t hostname;
|
extern convar_t hostname;
|
||||||
extern convar_t skill;
|
extern convar_t skill;
|
||||||
|
@ -502,7 +502,8 @@ void SV_AutoSave_f( void )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SV_SaveGame( "autosave" );
|
if( Cvar_VariableInteger( "sv_autosave" ) )
|
||||||
|
SV_SaveGame( "autosave" );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -60,6 +60,7 @@ CVAR_DEFINE_AUTO( sv_log_singleplayer, "0", FCVAR_ARCHIVE, "allows logging in si
|
|||||||
CVAR_DEFINE_AUTO( sv_log_onefile, "0", FCVAR_ARCHIVE, "logs server information to only one file" );
|
CVAR_DEFINE_AUTO( sv_log_onefile, "0", FCVAR_ARCHIVE, "logs server information to only one file" );
|
||||||
CVAR_DEFINE_AUTO( sv_trace_messages, "0", FCVAR_LATCH, "enable server usermessages tracing (good for developers)" );
|
CVAR_DEFINE_AUTO( sv_trace_messages, "0", FCVAR_LATCH, "enable server usermessages tracing (good for developers)" );
|
||||||
CVAR_DEFINE_AUTO( sv_master_response_timeout, "4", FCVAR_ARCHIVE, "master server heartbeat response timeout in seconds" );
|
CVAR_DEFINE_AUTO( sv_master_response_timeout, "4", FCVAR_ARCHIVE, "master server heartbeat response timeout in seconds" );
|
||||||
|
CVAR_DEFINE_AUTO( sv_autosave, "1", FCVAR_ARCHIVE|FCVAR_SERVER, "enable autosave command" );
|
||||||
|
|
||||||
// game-related cvars
|
// game-related cvars
|
||||||
CVAR_DEFINE_AUTO( mapcyclefile, "mapcycle.txt", 0, "name of multiplayer map cycle configuration file" );
|
CVAR_DEFINE_AUTO( mapcyclefile, "mapcycle.txt", 0, "name of multiplayer map cycle configuration file" );
|
||||||
@ -981,6 +982,8 @@ void SV_Init( void )
|
|||||||
Cvar_RegisterVariable( &sv_enttools_enable );
|
Cvar_RegisterVariable( &sv_enttools_enable );
|
||||||
Cvar_RegisterVariable( &sv_enttools_maxfire );
|
Cvar_RegisterVariable( &sv_enttools_maxfire );
|
||||||
|
|
||||||
|
Cvar_RegisterVariable( &sv_autosave );
|
||||||
|
|
||||||
sv_allow_joystick = Cvar_Get( "sv_allow_joystick", "1", FCVAR_ARCHIVE, "allow connect with joystick enabled" );
|
sv_allow_joystick = Cvar_Get( "sv_allow_joystick", "1", FCVAR_ARCHIVE, "allow connect with joystick enabled" );
|
||||||
sv_allow_mouse = Cvar_Get( "sv_allow_mouse", "1", FCVAR_ARCHIVE, "allow connect with mouse" );
|
sv_allow_mouse = Cvar_Get( "sv_allow_mouse", "1", FCVAR_ARCHIVE, "allow connect with mouse" );
|
||||||
sv_allow_touch = Cvar_Get( "sv_allow_touch", "1", FCVAR_ARCHIVE, "allow connect with touch controls" );
|
sv_allow_touch = Cvar_Get( "sv_allow_touch", "1", FCVAR_ARCHIVE, "allow connect with touch controls" );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user