mirror of
https://github.com/dhewm/dhewm3.git
synced 2025-03-19 09:11:41 +00:00
Add com_disableAutoSaves CVar (fix #620)
like in Doom3 BFG: If it's set to 1, no autosaves are created when entering a level. Defaults to 0 (autosaves enabled) While at it, I also documented com_numQuicksaves in Configuration.md
This commit is contained in:
parent
a0b52bd700
commit
c23d819f5e
5 changed files with 14 additions and 4 deletions
|
@ -22,6 +22,7 @@ Note: Numbers starting with a "#" like #330 refer to the bugreport with that num
|
|||
(setting it to `1` worked around the bug; #632)
|
||||
* Updated Dear ImGui to 1.91.4
|
||||
* Fix scaling of Grabber cursor in Resurrection of Evil in non-4:3 resolutions (#637)
|
||||
* Add `com_disableAutoSaves` CVar: If set to `1`, Autosaves (when starting a level) are disabled (#620)
|
||||
|
||||
1.5.4 (2024-08-03)
|
||||
------------------------------------------------------------------------
|
||||
|
|
|
@ -179,6 +179,11 @@ This can be configured with the following CVars:
|
|||
|
||||
## Other CVars added in dhewm3
|
||||
|
||||
- `com_disableAutoSaves` if set to `1`, no Autosaves are created when starting a level, and when
|
||||
restarting a level no attempt to load one will be made. Defaults to `0` (Autosaves *are* created)
|
||||
- `com_numQuicksaves` how many Quicksaves to keep - when creating a Quicksave, the oldest one gets
|
||||
overwritten. Defaults to `4`
|
||||
|
||||
- `g_hitEffect` if set to `1` (the default), mess up player camera when taking damage.
|
||||
Set to `0` if you don't like that effect.
|
||||
|
||||
|
|
|
@ -60,6 +60,8 @@ idCVar idSessionLocal::com_guid( "com_guid", "", CVAR_SYSTEM | CVAR_ARCHIVE | CV
|
|||
|
||||
idCVar idSessionLocal::com_numQuicksaves( "com_numQuicksaves", "4", CVAR_SYSTEM|CVAR_ARCHIVE|CVAR_INTEGER,
|
||||
"number of quicksaves to keep before overwriting the oldest", 1, 99 );
|
||||
idCVar idSessionLocal::com_disableAutoSaves( "com_disableAutoSaves", "0", CVAR_SYSTEM|CVAR_ARCHIVE|CVAR_BOOL,
|
||||
"Don't create Autosaves when entering a new map" );
|
||||
|
||||
idSessionLocal sessLocal;
|
||||
idSession *session = &sessLocal;
|
||||
|
@ -1246,8 +1248,8 @@ void idSessionLocal::MoveToNewMap( const char *mapName ) {
|
|||
|
||||
ExecuteMapChange();
|
||||
|
||||
if ( !mapSpawnData.serverInfo.GetBool("devmap") ) {
|
||||
// Autosave at the beginning of the level
|
||||
if ( !com_disableAutoSaves.GetBool() && !mapSpawnData.serverInfo.GetBool("devmap") ) {
|
||||
// Autosave at the beginning of the level - DG: unless disabled with "com_disableAutoSaves 1"
|
||||
|
||||
// DG: set an explicit savename to avoid problems with autosave names
|
||||
// (they were translated which caused problems like all alpha labs parts
|
||||
|
|
|
@ -186,6 +186,7 @@ public:
|
|||
static idCVar com_wipeSeconds;
|
||||
static idCVar com_guid;
|
||||
static idCVar com_numQuicksaves;
|
||||
static idCVar com_disableAutoSaves;
|
||||
|
||||
static idCVar gui_configServerRate;
|
||||
|
||||
|
|
|
@ -482,8 +482,9 @@ void idSessionLocal::HandleRestartMenuCommands( const char *menuCommand ) {
|
|||
}
|
||||
|
||||
if ( !idStr::Icmp( cmd, "restart" ) ) {
|
||||
if ( !LoadGame( GetAutoSaveName( mapSpawnData.serverInfo.GetString("si_map") ) ) ) {
|
||||
// If we can't load the autosave then just restart the map
|
||||
if ( com_disableAutoSaves.GetBool() // DG: support com_disableAutoSaves
|
||||
|| !LoadGame( GetAutoSaveName( mapSpawnData.serverInfo.GetString("si_map") ) ) ) {
|
||||
// If we can't load the autosave (or they're disabled) then just restart the map
|
||||
MoveToNewMap( mapSpawnData.serverInfo.GetString("si_map") );
|
||||
}
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue