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.

67 lines
1.8 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #include "cbase.h"
  7. #include "te_particlesystem.h"
  8. // memdbgon must be the last include file in a .cpp file!!!
  9. #include "tier0/memdbgon.h"
  10. //=============================================================================
  11. // Gauss explosion
  12. //=============================================================================
  13. class CTEGaussExplosion : public CTEParticleSystem
  14. {
  15. public:
  16. DECLARE_CLASS( CTEGaussExplosion, CTEParticleSystem );
  17. DECLARE_SERVERCLASS();
  18. CTEGaussExplosion( const char *name );
  19. virtual ~CTEGaussExplosion( void );
  20. virtual void Test( const Vector& current_origin, const QAngle& current_angles ) { };
  21. CNetworkVar( int, m_nType );
  22. CNetworkVector( m_vecDirection );
  23. };
  24. CTEGaussExplosion::CTEGaussExplosion( const char *name ) : BaseClass( name )
  25. {
  26. m_nType = 0;
  27. m_vecDirection.Init();
  28. }
  29. CTEGaussExplosion::~CTEGaussExplosion( void )
  30. {
  31. }
  32. IMPLEMENT_SERVERCLASS_ST( CTEGaussExplosion, DT_TEGaussExplosion )
  33. SendPropInt( SENDINFO(m_nType), 2, SPROP_UNSIGNED ),
  34. SendPropVector( SENDINFO(m_vecDirection), -1, SPROP_COORD ),
  35. END_SEND_TABLE()
  36. static CTEGaussExplosion g_TEGaussExplosion( "GaussExplosion" );
  37. //-----------------------------------------------------------------------------
  38. // Purpose:
  39. // Input : &pos -
  40. // &angles -
  41. //-----------------------------------------------------------------------------
  42. void TE_GaussExplosion( IRecipientFilter& filter, float delay,
  43. const Vector &pos, const Vector &dir, int type )
  44. {
  45. g_TEGaussExplosion.m_vecOrigin = pos;
  46. g_TEGaussExplosion.m_vecDirection = dir;
  47. g_TEGaussExplosion.m_nType = type;
  48. //Send it
  49. g_TEGaussExplosion.Create( filter, delay );
  50. }