From a655f65b9b904f6b4ad404b20754f86eaa27d38d Mon Sep 17 00:00:00 2001 From: inkoalawetrust <56005600+inkoalawetrust@users.noreply.github.com> Date: Sun, 23 Feb 2025 05:02:10 +0200 Subject: [PATCH] Exposed more of the Floor thinker. --- src/playsim/mapthinkers/a_floor.cpp | 16 +++++++++++++++ wadsrc/static/zscript/doombase.zs | 31 +++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) diff --git a/src/playsim/mapthinkers/a_floor.cpp b/src/playsim/mapthinkers/a_floor.cpp index 0d330e4e90..e81c10713c 100644 --- a/src/playsim/mapthinkers/a_floor.cpp +++ b/src/playsim/mapthinkers/a_floor.cpp @@ -96,6 +96,22 @@ void DFloor::Serialize(FSerializer &arc) ("instant", m_Instant); } +DEFINE_FIELD(DFloor, m_Type) +DEFINE_FIELD(DFloor, m_Crush) +DEFINE_FIELD(DFloor, m_Direction) +DEFINE_FIELD(DFloor, m_NewSpecial) +DEFINE_FIELD(DFloor, m_Texture) +DEFINE_FIELD(DFloor, m_FloorDestDist) +DEFINE_FIELD(DFloor, m_Speed) +DEFINE_FIELD(DFloor, m_ResetCount) +DEFINE_FIELD(DFloor, m_OrgDist) +DEFINE_FIELD(DFloor, m_Delay) +DEFINE_FIELD(DFloor, m_PauseTime) +DEFINE_FIELD(DFloor, m_StepTime) +DEFINE_FIELD(DFloor, m_PerStepTime) +DEFINE_FIELD(DFloor, m_Hexencrush) +DEFINE_FIELD(DFloor, m_Instant) + //========================================================================== // // MOVE A FLOOR TO ITS DESTINATION (UP OR DOWN) diff --git a/wadsrc/static/zscript/doombase.zs b/wadsrc/static/zscript/doombase.zs index 0f153628ae..46fdc4239b 100644 --- a/wadsrc/static/zscript/doombase.zs +++ b/wadsrc/static/zscript/doombase.zs @@ -768,6 +768,37 @@ class Floor : MovingFloor native genFloorChg }; + enum EStair + { + buildUp, + buildDown + }; + + enum EStairType + { + stairUseSpecials = 1, + stairSync = 2, + stairCrush = 4, + }; + + native readonly EFloor m_Type; + native readonly int m_Crush; + native readonly bool m_Hexencrush; + native readonly bool m_Instant; + native readonly int m_Direction; + native readonly SecSpecial m_NewSpecial; + native readonly TextureID m_Texture; + native readonly double m_FloorDestDist; + native readonly double m_Speed; + + // [RH] New parameters used to reset and delay stairs + native readonly double m_OrgDist; + native readonly int m_ResetCount; + native readonly int m_Delay; + native readonly int m_PauseTime; + native readonly int m_StepTime; + native readonly int m_PerStepTime; + deprecated("3.8", "Use Level.CreateFloor() instead") static bool CreateFloor(sector sec, int floortype, line ln, double speed, double height = 0, int crush = -1, int change = 0, bool crushmode = false, bool hereticlower = false) { return level.CreateFloor(sec, floortype, ln, speed, height, crush, change, crushmode, hereticlower);