diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/server/particle_system.h | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'game/server/particle_system.h')
| -rw-r--r-- | game/server/particle_system.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/game/server/particle_system.h b/game/server/particle_system.h new file mode 100644 index 0000000..ecf758c --- /dev/null +++ b/game/server/particle_system.h @@ -0,0 +1,59 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +//============================================================================= + +#ifndef PARTICLE_SYSTEM_H +#define PARTICLE_SYSTEM_H +#ifdef _WIN32 +#pragma once +#endif + +#include "cbase.h" + +//----------------------------------------------------------------------------- +// Purpose: An entity that spawns and controls a particle system +//----------------------------------------------------------------------------- +class CParticleSystem : public CBaseEntity +{ + DECLARE_CLASS( CParticleSystem, CBaseEntity ); +public: + DECLARE_SERVERCLASS(); + DECLARE_DATADESC(); + + CParticleSystem(); + + virtual void Precache( void ); + virtual void Spawn( void ); + virtual void Activate( void ); + virtual int UpdateTransmitState(void); + + void StartParticleSystem( void ); + void StopParticleSystem( void ); + + void InputStart( inputdata_t &inputdata ); + void InputStop( inputdata_t &inputdata ); + void StartParticleSystemThink( void ); + + enum { kMAXCONTROLPOINTS = 63 }; ///< actually one less than the total number of cpoints since 0 is assumed to be me + +protected: + + /// Load up and resolve the entities that are supposed to be the control points + void ReadControlPointEnts( void ); + + bool m_bStartActive; + string_t m_iszEffectName; + + CNetworkVar( bool, m_bActive ); + CNetworkVar( int, m_iEffectIndex ) + CNetworkVar( float, m_flStartTime ); // Time at which this effect was started. This is used after restoring an active effect. + + string_t m_iszControlPointNames[kMAXCONTROLPOINTS]; + CNetworkArray( EHANDLE, m_hControlPointEnts, kMAXCONTROLPOINTS ); + CNetworkArray( unsigned char, m_iControlPointParents, kMAXCONTROLPOINTS ); + CNetworkVar( bool, m_bWeatherEffect ); +}; + +#endif // PARTICLE_SYSTEM_H |