From 4cc8ba339925572ceadc786c7c88d5855b3d8716 Mon Sep 17 00:00:00 2001 From: Marisa Kirisame Date: Sun, 28 Jan 2018 21:25:19 +0100 Subject: [PATCH] Export GetSector() again, removed lightingdata assignment. --- src/dsectoreffect.cpp | 5 +++++ src/p_lights.cpp | 1 - wadsrc/static/zscript/base.txt | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/dsectoreffect.cpp b/src/dsectoreffect.cpp index b1d517fe7..38fd548bd 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 504095a40..2a52692b5 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 5d30435b5..52aa13e55 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