diff --git a/src/dsectoreffect.cpp b/src/dsectoreffect.cpp index b1d517fe77..38fd548bd3 100644 --- a/src/dsectoreffect.cpp +++ b/src/dsectoreffect.cpp @@ -78,6 +78,11 @@ void DSectorEffect::Serialize(FSerializer &arc) DEFINE_FIELD(DSectorEffect, m_Sector) +DEFINE_ACTION_FUNCTION(DSectorEffect, GetSector) +{ + PARAM_SELF_PROLOGUE(DSectorEffect); + ACTION_RETURN_POINTER(self->GetSector()); +} IMPLEMENT_CLASS(DMover, true, true) diff --git a/src/p_lights.cpp b/src/p_lights.cpp index 504095a40b..2a52692b50 100644 --- a/src/p_lights.cpp +++ b/src/p_lights.cpp @@ -191,7 +191,6 @@ DLighting::DLighting (sector_t *sector) : DSectorEffect (sector) { ChangeStatNum (STAT_LIGHT); - sector->lightingdata = this; } //----------------------------------------------------------------------------- diff --git a/wadsrc/static/zscript/base.txt b/wadsrc/static/zscript/base.txt index 5d30435b59..52aa13e556 100644 --- a/wadsrc/static/zscript/base.txt +++ b/wadsrc/static/zscript/base.txt @@ -795,6 +795,8 @@ struct StringStruct native class SectorEffect : Thinker native { native protected Sector m_Sector; + + native clearscope Sector GetSector(); } class Mover : SectorEffect native