mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-17 18:01:39 +00:00
7b7623d2c4
This was done to ensure it can be properly overridden in scripts without causing problems when called during engine shutdown for the type and symbol objects the VM needs to work and to have the scripted version always run first. Since the scripted OnDestroy method never calls the native version - the native one is run after the scripted one - this can be simply skipped over during shutdown.
59 lines
1.1 KiB
C++
59 lines
1.1 KiB
C++
#ifndef __DSECTOREFFECT_H__
|
|
#define __DSECTOREFFECT_H__
|
|
|
|
#include "dthinker.h"
|
|
#include "r_defs.h"
|
|
|
|
class DSectorEffect : public DThinker
|
|
{
|
|
DECLARE_CLASS (DSectorEffect, DThinker)
|
|
public:
|
|
DSectorEffect (sector_t *sector);
|
|
|
|
|
|
void Serialize(FSerializer &arc);
|
|
void OnDestroy() override;
|
|
|
|
sector_t *GetSector() const { return m_Sector; }
|
|
|
|
protected:
|
|
DSectorEffect ();
|
|
sector_t *m_Sector;
|
|
};
|
|
|
|
class DMover : public DSectorEffect
|
|
{
|
|
DECLARE_CLASS (DMover, DSectorEffect)
|
|
HAS_OBJECT_POINTERS
|
|
public:
|
|
DMover (sector_t *sector);
|
|
void StopInterpolation(bool force = false);
|
|
protected:
|
|
TObjPtr<DInterpolation> interpolation;
|
|
private:
|
|
protected:
|
|
DMover ();
|
|
|
|
void Serialize(FSerializer &arc);
|
|
void OnDestroy() override;
|
|
};
|
|
|
|
class DMovingFloor : public DMover
|
|
{
|
|
DECLARE_CLASS (DMovingFloor, DMover)
|
|
public:
|
|
DMovingFloor (sector_t *sector);
|
|
protected:
|
|
DMovingFloor ();
|
|
};
|
|
|
|
class DMovingCeiling : public DMover
|
|
{
|
|
DECLARE_CLASS (DMovingCeiling, DMover)
|
|
public:
|
|
DMovingCeiling (sector_t *sector, bool interpolate = true);
|
|
protected:
|
|
DMovingCeiling ();
|
|
};
|
|
|
|
#endif //__DSECTOREFFECT_H__
|