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.

85 lines
2.0 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Defines the server side of a steam jet particle system entity.
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef SMOKESTACK_H
  8. #define SMOKESTACK_H
  9. #pragma once
  10. #include "baseparticleentity.h"
  11. //==================================================
  12. // CSmokeStack
  13. //==================================================
  14. class CSmokeStackLightInfo
  15. {
  16. public:
  17. DECLARE_CLASS_NOBASE( CSmokeStackLightInfo );
  18. DECLARE_SIMPLE_DATADESC();
  19. DECLARE_NETWORKVAR_CHAIN();
  20. CNetworkVector( m_vPos );
  21. CNetworkVector( m_vColor );
  22. CNetworkVar( float, m_flIntensity );
  23. };
  24. class CSmokeStack : public CBaseParticleEntity
  25. {
  26. public:
  27. DECLARE_CLASS( CSmokeStack, CBaseParticleEntity );
  28. DECLARE_DATADESC();
  29. DECLARE_SERVERCLASS();
  30. CSmokeStack();
  31. ~CSmokeStack();
  32. virtual void Spawn( void );
  33. virtual void Activate();
  34. virtual bool KeyValue( const char *szKeyName, const char *szValue );
  35. virtual void Precache();
  36. protected:
  37. // Input handlers.
  38. void InputTurnOn(inputdata_t &data);
  39. void InputTurnOff(inputdata_t &data);
  40. void InputToggle(inputdata_t &data);
  41. void RecalcWindVector();
  42. // Stuff from the datatable.
  43. public:
  44. CNetworkVar( float, m_SpreadSpeed );
  45. CNetworkVar( float, m_Speed );
  46. CNetworkVar( float, m_StartSize );
  47. CNetworkVar( float, m_EndSize );
  48. CNetworkVar( float, m_Rate );
  49. CNetworkVar( float, m_JetLength ); // Length of the jet. Lifetime is derived from this.
  50. CNetworkVar( float, m_flRollSpeed );
  51. CNetworkVar( int, m_bEmit ); // Emit particles?
  52. CNetworkVar( float, m_flBaseSpread );
  53. CSmokeStackLightInfo m_AmbientLight;
  54. CSmokeStackLightInfo m_DirLight;
  55. CNetworkVar( float, m_flTwist );
  56. string_t m_strMaterialModel;
  57. CNetworkVar( int, m_iMaterialModel );
  58. int m_WindAngle;
  59. int m_WindSpeed;
  60. CNetworkVector( m_vWind ); // m_vWind is just calculated from m_WindAngle and m_WindSpeed.
  61. bool m_InitialState;
  62. };
  63. #endif // SMOKESTACK_H