Counter Strike : Global Offensive Source Code
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.

75 lines
1.7 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. #ifndef PARTICLE_SMOKEGRENADE_H
  9. #define PARTICLE_SMOKEGRENADE_H
  10. #include "baseparticleentity.h"
  11. #define PARTICLESMOKEGRENADE_ENTITYNAME "env_particlesmokegrenade"
  12. #define MIN_SMOKE_TINT 0.5f
  13. #define MAX_SMOKE_TINT 0.6f
  14. class ParticleSmokeGrenade : public CBaseParticleEntity
  15. {
  16. DECLARE_DATADESC();
  17. public:
  18. DECLARE_CLASS( ParticleSmokeGrenade, CBaseParticleEntity );
  19. DECLARE_SERVERCLASS();
  20. ParticleSmokeGrenade();
  21. virtual ~ParticleSmokeGrenade();
  22. virtual void Spawn( void );
  23. virtual int UpdateTransmitState( void );
  24. void SetCreator(CBasePlayer *creator);
  25. CBasePlayer* GetCreator();
  26. public:
  27. // Tell the client entity to start filling the volume.
  28. void FillVolume();
  29. // Set the times it fades out at.
  30. void SetFadeTime(float startTime, float endTime);
  31. // Set time to fade out relative to current time
  32. void SetRelativeFadeTime(float startTime, float endTime);
  33. // Set the tint color of the grenade smoke.
  34. void SetSmokeColor(Vector color);
  35. void Think( void );
  36. public:
  37. // Stage 0 (default): make a smoke trail that follows the entity it's following.
  38. // Stage 1 : fill a volume with smoke.
  39. CNetworkVar( unsigned char, m_CurrentStage );
  40. CNetworkVar( float, m_flSpawnTime );
  41. // When to fade in and out.
  42. CNetworkVar( float, m_FadeStartTime );
  43. CNetworkVar( float, m_FadeEndTime );
  44. CNetworkVar( Vector, m_MinColor );
  45. CNetworkVar( Vector, m_MaxColor );
  46. protected:
  47. EHANDLE m_creatorPlayer;
  48. };
  49. #endif