Exposed DDoor to ZScript.

Also added a ZScript-only enum for the movement direction..
This commit is contained in:
inkoalawetrust 2025-02-22 14:32:19 +02:00 committed by Ricardo Luís Vaz Silva
commit d924573d8a
3 changed files with 55 additions and 7 deletions

View file

@ -40,6 +40,7 @@
#include "g_levellocals.h"
#include "animations.h"
#include "texturemanager.h"
#include "vm.h"
//============================================================================
//
@ -64,6 +65,17 @@ void DDoor::Serialize(FSerializer &arc)
("lighttag", m_LightTag);
}
DEFINE_FIELD(DDoor, m_Type)
DEFINE_FIELD(DDoor, m_TopDist)
DEFINE_FIELD(DDoor, m_BotSpot)
DEFINE_FIELD(DDoor, m_BotDist)
DEFINE_FIELD(DDoor, m_OldFloorDist)
DEFINE_FIELD(DDoor, m_Speed)
DEFINE_FIELD(DDoor, m_Direction)
DEFINE_FIELD(DDoor, m_TopWait)
DEFINE_FIELD(DDoor, m_TopCountdown)
DEFINE_FIELD(DDoor, m_LightTag)
//============================================================================
//
// T_VerticalDoor

View file

@ -17,16 +17,10 @@ public:
doorWaitClose,
};
void Construct(sector_t *sector);
void Construct(sector_t *sec, EVlDoor type, double speed, int delay, int lightTag, int topcountdown);
void Serialize(FSerializer &arc);
void Tick ();
protected:
EVlDoor m_Type;
double m_TopDist;
double m_BotDist, m_OldFloorDist;
vertex_t *m_BotSpot;
vertex_t* m_BotSpot;
double m_Speed;
// 1 = up, 0 = waiting at top, -1 = down
@ -40,6 +34,12 @@ protected:
int m_LightTag;
void Construct(sector_t *sector);
void Construct(sector_t *sec, EVlDoor type, double speed, int delay, int lightTag, int topcountdown);
void Serialize(FSerializer &arc);
void Tick ();
protected:
void DoorSound (bool raise, class DSeqNode *curseq=NULL) const;
private: