From 78f3de6d16b2d9f138df21331e70d152deec6012 Mon Sep 17 00:00:00 2001 From: tmyqlfpir <80724828+tmyqlfpir@users.noreply.github.com> Date: Mon, 30 Sep 2024 23:33:18 +1000 Subject: [PATCH] Blood: Fix loading when using a separate game mod path --- source/blood/src/menu.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/source/blood/src/menu.cpp b/source/blood/src/menu.cpp index 6c4c6de212..da41899a4f 100644 --- a/source/blood/src/menu.cpp +++ b/source/blood/src/menu.cpp @@ -2741,14 +2741,20 @@ void LoadGame(CGameMenuItemZEditBitmap *pItem, CGameMenuEvent *event) int nSlot = pItem->at28; if (gGameOptions.nGameType != kGameTypeSinglePlayer) return; + int const bakpathsearchmode = pathsearchmode; + pathsearchmode = 1; G_ModDirSnprintf(strLoadGameName, BMAX_PATH, "game00%02d.sav", nSlot); if (!testkopen(strLoadGameName, 0)) + { + pathsearchmode = bakpathsearchmode; return; + } viewLoadingScreen(gMenuPicnum, "Loading", "Loading Saved Game", strRestoreGameStrings[nSlot]); videoNextPage(); LoadSave::LoadGame(strLoadGameName); gGameMenuMgr.Deactivate(); gQuickLoadSlot = nSlot; + pathsearchmode = bakpathsearchmode; } void QuickLoadGame(void) @@ -2756,13 +2762,19 @@ void QuickLoadGame(void) char strLoadGameName[BMAX_PATH]; if (gGameOptions.nGameType != kGameTypeSinglePlayer) return; + int const bakpathsearchmode = pathsearchmode; + pathsearchmode = 1; G_ModDirSnprintf(strLoadGameName, BMAX_PATH, "game00%02d.sav", gQuickLoadSlot); if (!testkopen(strLoadGameName, 0)) + { + pathsearchmode = bakpathsearchmode; return; + } viewLoadingScreen(gMenuPicnum, "Loading", "Loading Saved Game", strRestoreGameStrings[gQuickLoadSlot]); videoNextPage(); LoadSave::LoadGame(strLoadGameName); gGameMenuMgr.Deactivate(); + pathsearchmode = bakpathsearchmode; } void ClearUserMapNameOnLevelChange(CGameMenuItemZCycle *pItem)