Skip to content

Commit

Permalink
Blood: Fix loading when using a separate game mod path
Browse files Browse the repository at this point in the history
  • Loading branch information
tmyqlfpir authored and Hendricks266 committed Oct 1, 2024
1 parent 7c1b390 commit 78f3de6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions source/blood/src/menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2741,28 +2741,40 @@ 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)
{
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)
Expand Down

0 comments on commit 78f3de6

Please sign in to comment.