mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Restore save_p after P_LoadLevel
P_LoadLevel calls some functions that save gamedata and unset save_p.
This commit is contained in:
parent
33167078c8
commit
a29d43d3b5
1 changed files with 6 additions and 0 deletions
|
|
@ -4867,6 +4867,7 @@ static inline boolean P_NetUnArchiveMisc(boolean reloading)
|
||||||
{
|
{
|
||||||
size_t i, j;
|
size_t i, j;
|
||||||
size_t numTasks;
|
size_t numTasks;
|
||||||
|
UINT8 *old_save_p;
|
||||||
|
|
||||||
if (READUINT32(save_p) != ARCHIVEBLOCK_MISC)
|
if (READUINT32(save_p) != ARCHIVEBLOCK_MISC)
|
||||||
I_Error("Bad $$$.sav at archive block Misc");
|
I_Error("Bad $$$.sav at archive block Misc");
|
||||||
|
|
@ -4909,12 +4910,17 @@ static inline boolean P_NetUnArchiveMisc(boolean reloading)
|
||||||
|
|
||||||
encoremode = (boolean)READUINT8(save_p);
|
encoremode = (boolean)READUINT8(save_p);
|
||||||
|
|
||||||
|
// FIXME: save_p should not be global!!!
|
||||||
|
old_save_p = save_p;
|
||||||
|
|
||||||
if (!P_LoadLevel(true, reloading))
|
if (!P_LoadLevel(true, reloading))
|
||||||
{
|
{
|
||||||
CONS_Alert(CONS_ERROR, M_GetText("Can't load the level!\n"));
|
CONS_Alert(CONS_ERROR, M_GetText("Can't load the level!\n"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
save_p = old_save_p;
|
||||||
|
|
||||||
// get the time
|
// get the time
|
||||||
leveltime = READUINT32(save_p);
|
leveltime = READUINT32(save_p);
|
||||||
lastmap = READINT16(save_p);
|
lastmap = READINT16(save_p);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue