- give the sector a level reference.

This commit is contained in:
Christoph Oelckers 2019-01-27 17:12:03 +01:00
parent 522cc855ad
commit 4f540c1703
3 changed files with 3 additions and 2 deletions

View file

@ -1098,6 +1098,7 @@ void MapLoader::LoadSectors (MapData *map, FMissingTextureTracker &missingtex)
for (unsigned i = 0; i < numsectors; i++, ss++, ms++)
{
ss->e = &sectors[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));

View file

@ -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.);

View file

@ -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