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.

210 lines
5.9 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //
  7. //=============================================================================//
  8. #ifndef SMOKE_TRAIL_H
  9. #define SMOKE_TRAIL_H
  10. #include "baseparticleentity.h"
  11. //==================================================
  12. // SmokeTrail
  13. //==================================================
  14. class SmokeTrail : public CBaseParticleEntity
  15. {
  16. DECLARE_DATADESC();
  17. public:
  18. DECLARE_CLASS( SmokeTrail, CBaseParticleEntity );
  19. DECLARE_SERVERCLASS();
  20. SmokeTrail();
  21. virtual bool KeyValue( const char *szKeyName, const char *szValue );
  22. void SetEmit(bool bVal);
  23. void FollowEntity( CBaseEntity *pEntity, const char *pAttachmentName = NULL);
  24. static SmokeTrail* CreateSmokeTrail();
  25. public:
  26. // Effect parameters. These will assume default values but you can change them.
  27. CNetworkVector( m_StartColor ); // Fade between these colors.
  28. CNetworkVector( m_EndColor );
  29. CNetworkVar( float, m_Opacity );
  30. CNetworkVar( float, m_SpawnRate ); // How many particles per second.
  31. CNetworkVar( float, m_ParticleLifetime ); // How long do the particles live?
  32. CNetworkVar( float, m_StopEmitTime ); // When do I stop emitting particles?
  33. CNetworkVar( float, m_MinSpeed ); // Speed range.
  34. CNetworkVar( float, m_MaxSpeed );
  35. CNetworkVar( float, m_StartSize ); // Size ramp.
  36. CNetworkVar( float, m_EndSize );
  37. CNetworkVar( float, m_SpawnRadius );
  38. CNetworkVar( float, m_MinDirectedSpeed ); // Speed range.
  39. CNetworkVar( float, m_MaxDirectedSpeed );
  40. CNetworkVar( bool, m_bEmit );
  41. CNetworkVar( int, m_nAttachment );
  42. };
  43. //==================================================
  44. // RocketTrail
  45. //==================================================
  46. class RocketTrail : public CBaseParticleEntity
  47. {
  48. DECLARE_DATADESC();
  49. public:
  50. DECLARE_CLASS( RocketTrail, CBaseParticleEntity );
  51. DECLARE_SERVERCLASS();
  52. RocketTrail();
  53. void SetEmit(bool bVal);
  54. void FollowEntity( CBaseEntity *pEntity, const char *pAttachmentName = NULL);
  55. static RocketTrail *CreateRocketTrail();
  56. public:
  57. // Effect parameters. These will assume default values but you can change them.
  58. CNetworkVector( m_StartColor ); // Fade between these colors.
  59. CNetworkVector( m_EndColor );
  60. CNetworkVar( float, m_Opacity );
  61. CNetworkVar( float, m_SpawnRate ); // How many particles per second.
  62. CNetworkVar( float, m_ParticleLifetime ); // How long do the particles live?
  63. CNetworkVar( float, m_StopEmitTime ); // When do I stop emitting particles?
  64. CNetworkVar( float, m_MinSpeed ); // Speed range.
  65. CNetworkVar( float, m_MaxSpeed );
  66. CNetworkVar( float, m_StartSize ); // Size ramp.
  67. CNetworkVar( float, m_EndSize );
  68. CNetworkVar( float, m_SpawnRadius );
  69. CNetworkVar( bool, m_bEmit );
  70. CNetworkVar( int, m_nAttachment );
  71. CNetworkVar( bool, m_bDamaged );
  72. CNetworkVar( float, m_flFlareScale ); // Size of the flare
  73. };
  74. //==================================================
  75. // SporeTrail
  76. //==================================================
  77. class SporeTrail : public CBaseParticleEntity
  78. {
  79. DECLARE_DATADESC();
  80. public:
  81. DECLARE_CLASS( SporeTrail, CBaseParticleEntity );
  82. DECLARE_SERVERCLASS();
  83. SporeTrail( void );
  84. static SporeTrail* CreateSporeTrail();
  85. //Data members
  86. public:
  87. CNetworkVector( m_vecEndColor );
  88. CNetworkVar( float, m_flSpawnRate );
  89. CNetworkVar( float, m_flParticleLifetime );
  90. CNetworkVar( float, m_flStartSize );
  91. CNetworkVar( float, m_flEndSize );
  92. CNetworkVar( float, m_flSpawnRadius );
  93. CNetworkVar( bool, m_bEmit );
  94. };
  95. //==================================================
  96. // SporeExplosion
  97. //==================================================
  98. class SporeExplosion : public CBaseParticleEntity
  99. {
  100. DECLARE_DATADESC();
  101. public:
  102. DECLARE_CLASS( SporeExplosion, CBaseParticleEntity );
  103. DECLARE_SERVERCLASS();
  104. SporeExplosion( void );
  105. void Spawn( void );
  106. static SporeExplosion* CreateSporeExplosion();
  107. void InputEnable( inputdata_t &inputdata );
  108. void InputDisable( inputdata_t &inputdata );
  109. //Data members
  110. public:
  111. bool m_bDisabled;
  112. CNetworkVar( float, m_flSpawnRate );
  113. CNetworkVar( float, m_flParticleLifetime );
  114. CNetworkVar( float, m_flStartSize );
  115. CNetworkVar( float, m_flEndSize );
  116. CNetworkVar( float, m_flSpawnRadius );
  117. CNetworkVar( bool, m_bEmit );
  118. CNetworkVar( bool, m_bDontRemove );
  119. };
  120. //==================================================
  121. // CFireTrail
  122. //==================================================
  123. class CFireTrail : public CBaseParticleEntity
  124. {
  125. DECLARE_DATADESC();
  126. public:
  127. DECLARE_CLASS( CFireTrail, CBaseParticleEntity );
  128. DECLARE_SERVERCLASS();
  129. static CFireTrail *CreateFireTrail( void );
  130. void FollowEntity( CBaseEntity *pEntity, const char *pAttachmentName );
  131. void Precache( void );
  132. CNetworkVar( int, m_nAttachment );
  133. CNetworkVar( float, m_flLifetime );
  134. };
  135. //==================================================
  136. // DustTrail
  137. //==================================================
  138. class DustTrail : public CBaseParticleEntity
  139. {
  140. DECLARE_DATADESC();
  141. public:
  142. DECLARE_CLASS( DustTrail, CBaseParticleEntity );
  143. DECLARE_SERVERCLASS();
  144. DustTrail();
  145. virtual bool KeyValue( const char *szKeyName, const char *szValue );
  146. void SetEmit(bool bVal);
  147. static DustTrail* CreateDustTrail();
  148. public:
  149. // Effect parameters. These will assume default values but you can change them.
  150. CNetworkVector( m_Color );
  151. CNetworkVar( float, m_Opacity );
  152. CNetworkVar( float, m_SpawnRate ); // How many particles per second.
  153. CNetworkVar( float, m_ParticleLifetime ); // How long do the particles live?
  154. CNetworkVar( float, m_StopEmitTime ); // When do I stop emitting particles?
  155. CNetworkVar( float, m_MinSpeed ); // Speed range.
  156. CNetworkVar( float, m_MaxSpeed );
  157. CNetworkVar( float, m_StartSize ); // Size ramp.
  158. CNetworkVar( float, m_EndSize );
  159. CNetworkVar( float, m_SpawnRadius );
  160. CNetworkVar( float, m_MinDirectedSpeed ); // Speed range.
  161. CNetworkVar( float, m_MaxDirectedSpeed );
  162. CNetworkVar( bool, m_bEmit );
  163. CNetworkVar( int, m_nAttachment );
  164. };
  165. #endif