- refactored the global sectors array into a more VM friendly type and moved it into FLevelLocals.

This commit is contained in:
Christoph Oelckers 2017-01-07 19:32:24 +01:00
commit c02281a439
57 changed files with 438 additions and 456 deletions

View file

@ -2241,7 +2241,7 @@ void G_DoSaveGame (bool okForQuicksave, FString filename, const char *descriptio
// Do not even try, if we're not in a level. (Can happen after
// a demo finishes playback.)
if (lines == NULL || sectors == NULL || gamestate != GS_LEVEL)
if (lines == NULL || level.sectors.Size() == 0 || gamestate != GS_LEVEL)
{
return;
}
@ -2801,7 +2801,7 @@ void G_DoPlayDemo (void)
{
G_InitNew (mapname, false);
}
else if (numsectors == 0)
else if (level.sectors.Size() == 0)
{
I_Error("Cannot play demo without its savegame\n");
}