mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
move the old "can't load the level" error to its proper place, added specific error messages for all the times that unarchiving Lua banks can fail
# Conflicts: # src/d_clisrv.c
This commit is contained in:
parent
1219f36ca2
commit
c67b52f85d
2 changed files with 14 additions and 8 deletions
|
|
@ -1276,10 +1276,6 @@ static void CL_LoadReceivedSavegame(boolean reloading)
|
|||
CON_LogMessage("\"\n");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CONS_Alert(CONS_ERROR, M_GetText("Can't load the level!\n"));
|
||||
}
|
||||
|
||||
// done
|
||||
Z_Free(savebuffer);
|
||||
|
|
|
|||
|
|
@ -4525,7 +4525,10 @@ static inline boolean P_NetUnArchiveMisc(boolean reloading)
|
|||
encoremode = (boolean)READUINT8(save_p);
|
||||
|
||||
if (!P_LoadLevel(true, reloading))
|
||||
{
|
||||
CONS_Alert(CONS_ERROR, M_GetText("Can't load the level!\n"));
|
||||
return false;
|
||||
}
|
||||
|
||||
// get the time
|
||||
leveltime = READUINT32(save_p);
|
||||
|
|
@ -4652,19 +4655,26 @@ static inline boolean P_UnArchiveLuabanksAndConsistency(void)
|
|||
{
|
||||
switch (READUINT8(save_p))
|
||||
{
|
||||
case 0xb7:
|
||||
case 0xb7: // luabanks marker
|
||||
{
|
||||
UINT8 i, banksinuse = READUINT8(save_p);
|
||||
if (banksinuse > NUM_LUABANKS)
|
||||
{
|
||||
CONS_Alert(CONS_ERROR, M_GetText("Corrupt Luabanks! (Too many banks in use)\n"));
|
||||
return false;
|
||||
}
|
||||
for (i = 0; i < banksinuse; i++)
|
||||
luabanks[i] = READINT32(save_p);
|
||||
if (READUINT8(save_p) != 0x1d)
|
||||
if (READUINT8(save_p) != 0x1d) // consistency marker
|
||||
{
|
||||
CONS_Alert(CONS_ERROR, M_GetText("Corrupt Luabanks! (Failed consistency check)\n"));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
case 0x1d:
|
||||
case 0x1d: // consistency marker
|
||||
break;
|
||||
default:
|
||||
default: // anything else is nonsense
|
||||
CONS_Alert(CONS_ERROR, M_GetText("Failed consistency check (???)\n"));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue