diff --git a/src/g_cvars.cpp b/src/g_cvars.cpp index 6f661371e..31d224ccc 100644 --- a/src/g_cvars.cpp +++ b/src/g_cvars.cpp @@ -37,6 +37,7 @@ #include "g_levellocals.h" CVAR (Bool, cl_spreaddecals, true, CVAR_ARCHIVE) +CVAR(Bool, var_pushers, true, CVAR_SERVERINFO); CUSTOM_CVAR (Bool, gl_lights, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL) diff --git a/src/p_pillar.cpp b/src/p_pillar.cpp index ee9bb6e50..fb7605617 100644 --- a/src/p_pillar.cpp +++ b/src/p_pillar.cpp @@ -48,6 +48,12 @@ IMPLEMENT_POINTERS_START(DPillar) IMPLEMENT_POINTER(m_Interp_Ceiling) IMPLEMENT_POINTERS_END +//----------------------------------------------------------------------------- +// +// +// +//----------------------------------------------------------------------------- + void DPillar::OnDestroy() { if (m_Interp_Ceiling != nullptr) @@ -63,6 +69,12 @@ void DPillar::OnDestroy() Super::OnDestroy(); } +//----------------------------------------------------------------------------- +// +// +// +//----------------------------------------------------------------------------- + void DPillar::Serialize(FSerializer &arc) { Super::Serialize (arc); @@ -77,6 +89,12 @@ void DPillar::Serialize(FSerializer &arc) ("interp_ceiling", m_Interp_Ceiling); } +//----------------------------------------------------------------------------- +// +// +// +//----------------------------------------------------------------------------- + void DPillar::Tick () { EMoveResult r, s; @@ -114,6 +132,12 @@ void DPillar::Tick () } } +//----------------------------------------------------------------------------- +// +// +// +//----------------------------------------------------------------------------- + void DPillar::Construct(sector_t *sector, EPillar type, double speed, double floordist, double ceilingdist, int crush, bool hexencrush) { Super::Construct(sector); @@ -205,6 +229,12 @@ void DPillar::Construct(sector_t *sector, EPillar type, double speed, double flo } } +//----------------------------------------------------------------------------- +// +// +// +//----------------------------------------------------------------------------- + bool FLevelLocals::EV_DoPillar (DPillar::EPillar type, line_t *line, int tag, double speed, double height, double height2, int crush, bool hexencrush) { diff --git a/src/p_plats.cpp b/src/p_plats.cpp index 2b1e3e253..4cc4367ab 100644 --- a/src/p_plats.cpp +++ b/src/p_plats.cpp @@ -41,6 +41,12 @@ static FRandom pr_doplat ("DoPlat"); IMPLEMENT_CLASS(DPlat, false, false) +//----------------------------------------------------------------------------- +// +// +// +//----------------------------------------------------------------------------- + void DPlat::Serialize(FSerializer &arc) { Super::Serialize (arc); @@ -56,6 +62,12 @@ void DPlat::Serialize(FSerializer &arc) ("tag", m_Tag); } +//----------------------------------------------------------------------------- +// +// +// +//----------------------------------------------------------------------------- + void DPlat::PlayPlatSound (const char *sound) { if (m_Sector->Flags & SECF_SILENTMOVE) return; @@ -74,9 +86,12 @@ void DPlat::PlayPlatSound (const char *sound) } } +//----------------------------------------------------------------------------- // // Move a plat up and down // +//----------------------------------------------------------------------------- + void DPlat::Tick () { EMoveResult res; @@ -200,6 +215,12 @@ void DPlat::Tick () } } +//----------------------------------------------------------------------------- +// +// +// +//----------------------------------------------------------------------------- + void DPlat::Reactivate() { if (m_Type == platToggle) //jff 3/14/98 reactivate toggle type @@ -208,6 +229,11 @@ void DPlat::Reactivate() m_Status = m_OldStatus; } +//----------------------------------------------------------------------------- +// +// +// +//----------------------------------------------------------------------------- void DPlat::Stop() { @@ -215,16 +241,25 @@ void DPlat::Stop() m_Status = in_stasis; } +//----------------------------------------------------------------------------- +// +// +// +//----------------------------------------------------------------------------- + void DPlat::Construct (sector_t *sector) { Super::Construct(sector); } +//----------------------------------------------------------------------------- // // Do Platforms // [RH] Changed amount to height and added delay, // lip, change, tag, and speed parameters. // +//----------------------------------------------------------------------------- + bool FLevelLocals::EV_DoPlat (int tag, line_t *line, DPlat::EPlatType type, double height, double speed, int delay, int lip, int change) { DPlat *plat; @@ -402,6 +437,12 @@ bool FLevelLocals::EV_DoPlat (int tag, line_t *line, DPlat::EPlatType type, doub return rtn; } +//----------------------------------------------------------------------------- +// +// +// +//----------------------------------------------------------------------------- + void FLevelLocals::ActivateInStasisPlat (int tag) { DPlat *scan; @@ -414,6 +455,12 @@ void FLevelLocals::ActivateInStasisPlat (int tag) } } +//----------------------------------------------------------------------------- +// +// +// +//----------------------------------------------------------------------------- + void FLevelLocals::EV_StopPlat (int tag, bool remove) { DPlat *scan; diff --git a/src/p_pusher.cpp b/src/p_pusher.cpp index 24a015d14..bd9a40e5f 100644 --- a/src/p_pusher.cpp +++ b/src/p_pusher.cpp @@ -39,7 +39,7 @@ #include "p_spec_thinkers.h" #include "maploader/maploader.h" -CVAR(Bool, var_pushers, true, CVAR_SERVERINFO); +EXTERN_CVAR(Bool, var_pushers); IMPLEMENT_CLASS(DPusher, false, true) @@ -47,6 +47,12 @@ IMPLEMENT_POINTERS_START(DPusher) IMPLEMENT_POINTER(m_Source) IMPLEMENT_POINTERS_END +//----------------------------------------------------------------------------- +// +// +// +//----------------------------------------------------------------------------- + void DPusher::Serialize(FSerializer &arc) { Super::Serialize (arc); @@ -59,7 +65,7 @@ void DPusher::Serialize(FSerializer &arc) } -//////////////////////////////////////////////////////////////////////////// +//----------------------------------------------------------------------------- // // PUSH/PULL EFFECT // @@ -102,13 +108,14 @@ void DPusher::Serialize(FSerializer &arc) // to have the PUSH_MASK bit set. If this bit is turned off by a switch // at run-time, the effect will not occur. The controlling sector for // types 1 & 2 is the sector containing the MT_PUSH/MT_PULL Thing. +// +//----------------------------------------------------------------------------- - -#define PUSH_FACTOR 128 - -///////////////////////////// +//----------------------------------------------------------------------------- // // Add a push thinker to the thinker list +// +//----------------------------------------------------------------------------- void DPusher::Construct (DPusher::EPusher type, line_t *l, int magnitude, int angle, AActor *source, int affectee) @@ -140,11 +147,13 @@ int DPusher::CheckForSectorMatch (EPusher type, int tag) } -///////////////////////////// +//----------------------------------------------------------------------------- // // T_Pusher looks for all objects that are inside the radius of // the effect. // +//----------------------------------------------------------------------------- + void DPusher::Tick () { sector_t *sec; @@ -292,6 +301,11 @@ void DPusher::Tick () } } +//----------------------------------------------------------------------------- +// +// +// +//----------------------------------------------------------------------------- void FLevelLocals::AdjustPusher(int tag, int magnitude, int angle, bool wind) { diff --git a/src/p_spec_thinkers.h b/src/p_spec_thinkers.h index dfa4038ea..4508dfe6e 100644 --- a/src/p_spec_thinkers.h +++ b/src/p_spec_thinkers.h @@ -161,6 +161,12 @@ class DPusher : public DThinker { DECLARE_CLASS (DPusher, DThinker) HAS_OBJECT_POINTERS + + enum + { + PUSH_FACTOR = 128 + }; + public: enum EPusher {