summaryrefslogtreecommitdiff
path: root/game/server/particle_system.h
diff options
context:
space:
mode:
Diffstat (limited to 'game/server/particle_system.h')
-rw-r--r--game/server/particle_system.h59
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