Skip to content

Commit

Permalink
- Changed how the old quicksave works. Now you select the slot using …
Browse files Browse the repository at this point in the history
…quicksave like in original Doom.
  • Loading branch information
drfrag666 committed Aug 13, 2019
1 parent 13ee3e3 commit 1f7c241
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/menu/loadsavemenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,10 +400,6 @@ void FSavegameManager::NotifyNewSave(const FString &file, const FString &title,
void FSavegameManager::LoadSavegame(int Selected)
{
G_LoadGame(SaveGames[Selected]->Filename.GetChars(), true);
if (quickSaveSlot == (FSaveGameNode*)1)
{
quickSaveSlot = SaveGames[Selected];
}
M_ClearMenus();
V_SetBorderNeedRefresh();
LastAccessed = Selected;
Expand All @@ -429,6 +425,10 @@ void FSavegameManager::DoSave(int Selected, const char *savegamestring)
{
auto node = SaveGames[Selected];
G_SaveGame(node->Filename.GetChars(), savegamestring);
if (quickSaveSlot == (FSaveGameNode*)1)
{
quickSaveSlot = SaveGames[Selected];
}
}
else
{
Expand Down
10 changes: 5 additions & 5 deletions src/menu/messagebox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,17 @@ CCMD (quicksave)
G_DoQuickSave();
return;
}

if (savegameManager.quickSaveSlot == NULL || savegameManager.quickSaveSlot == (FSaveGameNode*)1)
{
S_Sound(CHAN_VOICE | CHAN_UI, "menu/activate", snd_menuvolume, ATTN_NONE);
M_StartControlPanel(false);
// signal that whatever gets loaded should be the new quicksave
savegameManager.quickSaveSlot = (FSaveGameNode *)1;
M_SetMenu(NAME_Savegamemenu);
return;
}

// [mxd]. Just save the game, no questions asked.
if (!saveloadconfirmation)
{
Expand Down Expand Up @@ -235,9 +237,7 @@ CCMD (quickload)
if (savegameManager.quickSaveSlot == NULL || savegameManager.quickSaveSlot == (FSaveGameNode*)1)
{
M_StartControlPanel(true);
// signal that whatever gets loaded should be the new quicksave
savegameManager.quickSaveSlot = (FSaveGameNode *)1;
M_SetMenu(NAME_Loadgamemenu);
M_StartMessage (GStrings("QSAVESPOT"), 1);
return;
}

Expand Down

0 comments on commit 1f7c241

Please sign in to comment.