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.

79 lines
2.3 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $Workfile: $
  6. // $Date: $
  7. //
  8. //-----------------------------------------------------------------------------
  9. // $Log: $
  10. //
  11. // $NoKeywords: $
  12. //=============================================================================//
  13. #include "cbase.h"
  14. #include "c_te_basebeam.h"
  15. #include "iviewrender_beams.h"
  16. // memdbgon must be the last include file in a .cpp file!!!
  17. #include "tier0/memdbgon.h"
  18. //-----------------------------------------------------------------------------
  19. // Purpose:
  20. //-----------------------------------------------------------------------------
  21. class C_TEBeamFollow : public C_TEBaseBeam
  22. {
  23. public:
  24. DECLARE_CLASS( C_TEBeamFollow, C_TEBaseBeam );
  25. DECLARE_CLIENTCLASS();
  26. C_TEBeamFollow( void );
  27. virtual ~C_TEBeamFollow( void );
  28. virtual void PostDataUpdate( DataUpdateType_t updateType );
  29. public:
  30. int m_iEntIndex;
  31. };
  32. //-----------------------------------------------------------------------------
  33. // Purpose:
  34. //-----------------------------------------------------------------------------
  35. C_TEBeamFollow::C_TEBeamFollow( void )
  36. {
  37. m_iEntIndex = 0;
  38. }
  39. //-----------------------------------------------------------------------------
  40. // Purpose:
  41. //-----------------------------------------------------------------------------
  42. C_TEBeamFollow::~C_TEBeamFollow( void )
  43. {
  44. }
  45. //-----------------------------------------------------------------------------
  46. // Purpose:
  47. // Input : bool -
  48. //-----------------------------------------------------------------------------
  49. void C_TEBeamFollow::PostDataUpdate( DataUpdateType_t updateType )
  50. {
  51. beams->CreateBeamFollow( m_iEntIndex, m_nModelIndex, m_nHaloIndex, 0, m_fLife,
  52. m_fWidth, m_fEndWidth, m_nFadeLength, r, g, b, a );
  53. }
  54. // Expose the TE to the engine.
  55. IMPLEMENT_CLIENTCLASS_EVENT( C_TEBeamFollow, DT_TEBeamFollow, CTEBeamFollow );
  56. BEGIN_RECV_TABLE(C_TEBeamFollow, DT_TEBeamFollow)
  57. RecvPropInt( RECVINFO(m_iEntIndex)),
  58. END_RECV_TABLE()
  59. void TE_BeamFollow( IRecipientFilter& filter, float delay,
  60. int iEntIndex, int modelIndex, int haloIndex, float life, float width, float endWidth,
  61. float fadeLength,float r, float g, float b, float a )
  62. {
  63. beams->CreateBeamFollow( iEntIndex, modelIndex, haloIndex, 0, life,
  64. width, endWidth, fadeLength, r, g, b, a );
  65. }