Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.7 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================
  6. #ifndef PARTICLE_SYSTEM_H
  7. #define PARTICLE_SYSTEM_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "cbase.h"
  12. //-----------------------------------------------------------------------------
  13. // Purpose: An entity that spawns and controls a particle system
  14. //-----------------------------------------------------------------------------
  15. class CParticleSystem : public CBaseEntity
  16. {
  17. DECLARE_CLASS( CParticleSystem, CBaseEntity );
  18. public:
  19. DECLARE_SERVERCLASS();
  20. DECLARE_DATADESC();
  21. CParticleSystem();
  22. virtual void Precache( void );
  23. virtual void Spawn( void );
  24. virtual void Activate( void );
  25. virtual int UpdateTransmitState(void);
  26. void StartParticleSystem( void );
  27. void StopParticleSystem( void );
  28. void InputStart( inputdata_t &inputdata );
  29. void InputStop( inputdata_t &inputdata );
  30. void StartParticleSystemThink( void );
  31. enum { kMAXCONTROLPOINTS = 63 }; ///< actually one less than the total number of cpoints since 0 is assumed to be me
  32. protected:
  33. /// Load up and resolve the entities that are supposed to be the control points
  34. void ReadControlPointEnts( void );
  35. bool m_bStartActive;
  36. string_t m_iszEffectName;
  37. CNetworkVar( bool, m_bActive );
  38. CNetworkVar( int, m_iEffectIndex )
  39. CNetworkVar( float, m_flStartTime ); // Time at which this effect was started. This is used after restoring an active effect.
  40. string_t m_iszControlPointNames[kMAXCONTROLPOINTS];
  41. CNetworkArray( EHANDLE, m_hControlPointEnts, kMAXCONTROLPOINTS );
  42. CNetworkArray( unsigned char, m_iControlPointParents, kMAXCONTROLPOINTS );
  43. CNetworkVar( bool, m_bWeatherEffect );
  44. };
  45. #endif // PARTICLE_SYSTEM_H