mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 13:01:47 +00:00
- prettification of a few files
This commit is contained in:
parent
65a812e316
commit
4984bc8c5f
5 changed files with 105 additions and 7 deletions
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -161,6 +161,12 @@ class DPusher : public DThinker
|
|||
{
|
||||
DECLARE_CLASS (DPusher, DThinker)
|
||||
HAS_OBJECT_POINTERS
|
||||
|
||||
enum
|
||||
{
|
||||
PUSH_FACTOR = 128
|
||||
};
|
||||
|
||||
public:
|
||||
enum EPusher
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue