mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-28 04:51:42 +00:00
Don't reload level on gamestate resend
The level will only reload during a gamestate reload if the map is horribly mismatched somehow. Minor differences in level state are already handled by other parts of the reload, so doing this on *every* reload wastes lots of time.
This commit is contained in:
parent
9213ea6f2b
commit
08299afa41
1 changed files with 14 additions and 3 deletions
|
|
@ -6699,6 +6699,8 @@ static boolean P_NetUnArchiveMisc(savebuffer_t *save, boolean reloading)
|
||||||
size_t i, j;
|
size_t i, j;
|
||||||
size_t numTasks;
|
size_t numTasks;
|
||||||
|
|
||||||
|
const INT16 prevgamemap = gamemap;
|
||||||
|
|
||||||
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");
|
||||||
|
|
||||||
|
|
@ -6739,10 +6741,19 @@ static boolean P_NetUnArchiveMisc(savebuffer_t *save, boolean reloading)
|
||||||
|
|
||||||
mapmusrng = READUINT8(save->p);
|
mapmusrng = READUINT8(save->p);
|
||||||
|
|
||||||
if (!P_LoadLevel(true, reloading))
|
// Only reload the level during a gamestate reload
|
||||||
|
// if the map is horribly mismatched somehow. Minor
|
||||||
|
// differences in level state are already handled
|
||||||
|
// by other parts of the reload, so doing this
|
||||||
|
// on *every* reload wastes lots of time that we
|
||||||
|
// will need for rollback down the road.
|
||||||
|
if (!reloading || prevgamemap != gamemap)
|
||||||
{
|
{
|
||||||
CONS_Alert(CONS_ERROR, M_GetText("Can't load the level!\n"));
|
if (!P_LoadLevel(true, reloading))
|
||||||
return false;
|
{
|
||||||
|
CONS_Alert(CONS_ERROR, M_GetText("Can't load the level!\n"));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// get the time
|
// get the time
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue