better savegame errors

This commit is contained in:
Alug committed 2024-02-14 12:19:38 +01:00
1 parent ea6016b1ba
commit 52f69324d9
2 files changed
+6 -1

No files matched your search

-1
View File
@@ -1935,7 +1935,6 @@ static void CL_LoadReceivedSavegame(void)
}
else
{
CONS_Alert(CONS_ERROR, M_GetText("Can't load the level!\n"));
Z_Free(savebuffer);
save_p = NULL;
if (unlink(tmpsave) == -1)
+6
View File
@@ -3364,7 +3364,10 @@ FUNCINLINE static ATTRINLINE boolean P_NetUnArchiveMisc(void)
encoremode = (boolean)READUINT8(save_p);
if (!P_SetupLevel(true))
{
CONS_Alert(CONS_ERROR, M_GetText("Can't load the level!\n"));
return false;
}
// get the time
leveltime = READUINT32(save_p);
@@ -3499,7 +3502,10 @@ boolean P_LoadGame(INT16 mapoverride)
// Savegame end marker
if (READUINT8(save_p) != 0x1d)
{
CONS_Alert(CONS_ERROR, M_GetText("Corrupt Luabanks! (Failed consistency check)\n"));
return false;
}
// Only do this after confirming savegame is ok
G_DeferedInitNew(false, G_BuildMapName(gamemap), savedata.skin, 0, true);