From 0cfdd699ad17b2163d55b4e28a64fbe1535e2858 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 19 Mar 2017 13:15:38 +0100 Subject: [PATCH] - exported the base thinker class for sector lighting effects to ZScript. --- src/dsectoreffect.cpp | 3 +++ src/dsectoreffect.h | 6 ++++-- wadsrc/static/zscript/base.txt | 10 ++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/dsectoreffect.cpp b/src/dsectoreffect.cpp index 466675dbcb..e02af8ccf0 100644 --- a/src/dsectoreffect.cpp +++ b/src/dsectoreffect.cpp @@ -72,6 +72,9 @@ void DSectorEffect::Serialize(FSerializer &arc) arc("sector", m_Sector); } +DEFINE_FIELD(DSectorEffect, m_Sector) + + IMPLEMENT_CLASS(DMover, false, true) IMPLEMENT_POINTERS_START(DMover) diff --git a/src/dsectoreffect.h b/src/dsectoreffect.h index e72e5bc56b..bdd2aa7133 100644 --- a/src/dsectoreffect.h +++ b/src/dsectoreffect.h @@ -16,9 +16,11 @@ public: sector_t *GetSector() const { return m_Sector; } -protected: - DSectorEffect (); sector_t *m_Sector; + +protected: + DSectorEffect(); + }; class DMover : public DSectorEffect diff --git a/wadsrc/static/zscript/base.txt b/wadsrc/static/zscript/base.txt index 06259c1f48..5315c22c4f 100644 --- a/wadsrc/static/zscript/base.txt +++ b/wadsrc/static/zscript/base.txt @@ -717,3 +717,13 @@ struct LookExParams int flags; State seestate; }; + +class SectorEffect : Thinker native +{ + native protected Sector m_Sector; +} + +class Lighting : SectorEffect native +{ +} +