mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-04-04 00:41:59 +00:00
Exposed DElevator to ZScript.
This commit is contained in:
parent
f0d0f259f7
commit
ecdfe39ddf
3 changed files with 33 additions and 6 deletions
|
@ -903,6 +903,12 @@ void DElevator::Serialize(FSerializer &arc)
|
|||
("interp_ceiling", m_Interp_Ceiling);
|
||||
}
|
||||
|
||||
DEFINE_FIELD(DElevator, m_Type)
|
||||
DEFINE_FIELD(DElevator, m_Direction)
|
||||
DEFINE_FIELD(DElevator, m_FloorDestDist)
|
||||
DEFINE_FIELD(DElevator, m_CeilingDestDist)
|
||||
DEFINE_FIELD(DElevator, m_Speed)
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
|
@ -973,7 +979,7 @@ void DElevator::Tick ()
|
|||
}
|
||||
}
|
||||
|
||||
if (res == EMoveResult::pastdest) // if destination height acheived
|
||||
if (res == EMoveResult::pastdest) // if destination height achieved
|
||||
{
|
||||
// make floor stop sound
|
||||
SN_StopSequence (m_Sector, CHAN_FLOOR);
|
||||
|
|
|
@ -105,6 +105,13 @@ public:
|
|||
elevateLower
|
||||
};
|
||||
|
||||
EElevator m_Type;
|
||||
int m_Direction;
|
||||
double m_FloorDestDist;
|
||||
double m_CeilingDestDist;
|
||||
double m_Speed;
|
||||
|
||||
|
||||
void Construct(sector_t *sec);
|
||||
|
||||
void OnDestroy() override;
|
||||
|
@ -112,11 +119,6 @@ public:
|
|||
void Tick ();
|
||||
|
||||
protected:
|
||||
EElevator m_Type;
|
||||
int m_Direction;
|
||||
double m_FloorDestDist;
|
||||
double m_CeilingDestDist;
|
||||
double m_Speed;
|
||||
TObjPtr<DInterpolation*> m_Interp_Ceiling;
|
||||
TObjPtr<DInterpolation*> m_Interp_Floor;
|
||||
|
||||
|
|
|
@ -643,6 +643,25 @@ class SectorEffect : Thinker native
|
|||
class Mover : SectorEffect native
|
||||
{}
|
||||
|
||||
class Elevator : Mover native
|
||||
{
|
||||
enum EElevator
|
||||
{
|
||||
elevateUp,
|
||||
elevateDown,
|
||||
elevateCurrent,
|
||||
// [RH] For FloorAndCeiling_Raise/Lower
|
||||
elevateRaise,
|
||||
elevateLower
|
||||
};
|
||||
|
||||
native readonly EElevator m_Type;
|
||||
native readonly int m_Direction;
|
||||
native readonly double m_FloorDestDist;
|
||||
native readonly double m_CeilingDestDist;
|
||||
native readonly double m_Speed;
|
||||
}
|
||||
|
||||
class MovingFloor : Mover native
|
||||
{}
|
||||
|
||||
|
|
Loading…
Reference in a new issue