- store extended sector info directly in FLevelLocals.

This is safer than using the first sector's reference.
This commit is contained in:
Christoph Oelckers 2020-10-05 00:39:21 +02:00
commit 9a994482b1
3 changed files with 4 additions and 9 deletions

View file

@ -314,11 +314,6 @@ void FLevelLocals::ClearLevelData()
DialogueRoots.Clear();
ClassRoots.Clear();
// delete allocated data in the level arrays.
if (sectors.Size() > 0)
{
delete[] sectors[0].e;
}
for (auto &sub : subsectors)
{
if (sub.BSP != nullptr) delete sub.BSP;
@ -335,6 +330,7 @@ void FLevelLocals::ClearLevelData()
canvasTextureInfo.EmptyList();
sections.Clear();
segs.Clear();
extsectors.Clear();
sectors.Clear();
linebuffer.Clear();
subsectorbuffer.Clear();