diff --git a/src/maploader/maploader.cpp b/src/maploader/maploader.cpp index 0f6917ac28..c603f18dcc 100644 --- a/src/maploader/maploader.cpp +++ b/src/maploader/maploader.cpp @@ -1098,6 +1098,7 @@ void MapLoader::LoadSectors (MapData *map, FMissingTextureTracker &missingtex) for (unsigned i = 0; i < numsectors; i++, ss++, ms++) { ss->e = §ors[0].e[i]; + ss->Level = Level; if (!map->HasBehavior) ss->Flags |= SECF_FLOORDROP; ss->SetPlaneTexZ(sector_t::floor, (double)LittleShort(ms->floorheight)); ss->floorplane.set(0, 0, 1., -ss->GetPlaneTexZ(sector_t::floor)); diff --git a/src/maploader/udmf.cpp b/src/maploader/udmf.cpp index 690bf4a687..ea23dabb1e 100644 --- a/src/maploader/udmf.cpp +++ b/src/maploader/udmf.cpp @@ -1445,6 +1445,7 @@ public: FName scroll_floor_type = NAME_None; memset(sec, 0, sizeof(*sec)); + sec->Level = Level; sec->lightlevel = 160; sec->SetXScale(sector_t::floor, 1.); // [RH] floor and ceiling scaling sec->SetYScale(sector_t::floor, 1.); diff --git a/src/r_defs.h b/src/r_defs.h index 0823251bc8..91f248f859 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -264,7 +264,6 @@ public: // Stores things/mobjs. // class DSectorEffect; -struct sector_t; struct FRemapTable; enum @@ -453,7 +452,6 @@ public: #include "p_3dfloors.h" struct subsector_t; -struct sector_t; struct side_t; extern bool gl_plane_reflection_i; @@ -652,6 +650,7 @@ struct sector_t splane planes[2]; + FLevelLocals *Level; extsector_t * e; // This stores data that requires construction/destruction. Such data must not be copied by R_FakeFlat. secplane_t floorplane, ceilingplane; // [RH] store floor and ceiling planes instead of heights