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.

86 lines
2.4 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_basetempentity.h"
  15. #include "tier0/vprof.h"
  16. // memdbgon must be the last include file in a .cpp file!!!
  17. #include "tier0/memdbgon.h"
  18. #define MAX_SPLINE_POINTS 16
  19. //-----------------------------------------------------------------------------
  20. // Purpose: BeamSpline TE
  21. //-----------------------------------------------------------------------------
  22. class C_TEBeamSpline : public C_BaseTempEntity
  23. {
  24. public:
  25. DECLARE_CLASS( C_TEBeamSpline, C_BaseTempEntity );
  26. DECLARE_CLIENTCLASS();
  27. C_TEBeamSpline( void );
  28. virtual ~C_TEBeamSpline( void );
  29. virtual void PostDataUpdate( DataUpdateType_t updateType );
  30. public:
  31. Vector m_vecPoints[ MAX_SPLINE_POINTS ];
  32. int m_nPoints;
  33. };
  34. //-----------------------------------------------------------------------------
  35. // Purpose:
  36. //-----------------------------------------------------------------------------
  37. C_TEBeamSpline::C_TEBeamSpline( void )
  38. {
  39. int i;
  40. for ( i = 0; i < MAX_SPLINE_POINTS; i++ )
  41. {
  42. m_vecPoints[ i ].Init();
  43. }
  44. m_nPoints = 0;
  45. }
  46. //-----------------------------------------------------------------------------
  47. // Purpose:
  48. //-----------------------------------------------------------------------------
  49. C_TEBeamSpline::~C_TEBeamSpline( void )
  50. {
  51. }
  52. void TE_BeamSpline( IRecipientFilter& filter, float delay,
  53. int points, Vector* rgPoints )
  54. {
  55. DevMsg( 1, "Beam spline with %i points invoked\n", points );
  56. }
  57. //-----------------------------------------------------------------------------
  58. // Purpose:
  59. // Input : bool -
  60. //-----------------------------------------------------------------------------
  61. void C_TEBeamSpline::PostDataUpdate( DataUpdateType_t updateType )
  62. {
  63. VPROF( "C_TEBeamSpline::PostDataUpdate" );
  64. DevMsg( 1, "Beam spline with %i points received\n", m_nPoints );
  65. }
  66. // Expose the TE to the engine.
  67. IMPLEMENT_CLIENTCLASS_EVENT( C_TEBeamSpline, DT_TEBeamSpline, CTEBeamSpline );
  68. BEGIN_RECV_TABLE_NOBASE(C_TEBeamSpline, DT_TEBeamSpline)
  69. RecvPropInt( RECVINFO( m_nPoints )),
  70. RecvPropArray(
  71. RecvPropVector( RECVINFO(m_vecPoints[0])),
  72. m_vecPoints)
  73. END_RECV_TABLE()