From 496eba3acb9e65be820409de2cc81acfcf15e9bf Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 4 Feb 2019 13:05:27 +0100 Subject: [PATCH] - fix polyobject init --- src/maploader/polyobjects.cpp | 1 + src/p_maputl.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/maploader/polyobjects.cpp b/src/maploader/polyobjects.cpp index 1ff264712..3c0a567ad 100644 --- a/src/maploader/polyobjects.cpp +++ b/src/maploader/polyobjects.cpp @@ -352,6 +352,7 @@ void MapLoader::PO_Init (void) InitSideLists (); Level->Polyobjects.Resize(NumPolyobjs); + for (auto &po : Level->Polyobjects) po.Level = Level; // must be done before the init loop below. polyIndex = 0; // index polyobj number // Find the startSpot points, and spawn each polyobj diff --git a/src/p_maputl.h b/src/p_maputl.h index 99a8a8a04..5a65c27d3 100644 --- a/src/p_maputl.h +++ b/src/p_maputl.h @@ -312,8 +312,9 @@ class FBlockThingsIterator public: FBlockThingsIterator(FLevelLocals *Level, int minx, int miny, int maxx, int maxy); - FBlockThingsIterator(FLevelLocals *Level, const FBoundingBox &box) + FBlockThingsIterator(FLevelLocals *l, const FBoundingBox &box) { + Level = l; init(box); } void init(const FBoundingBox &box);