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.

84 lines
2.5 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $Workfile: $
  6. // $Date: $
  7. // $NoKeywords: $
  8. //=============================================================================//
  9. #include "cbase.h"
  10. #include "c_basetempentity.h"
  11. #include "c_te_legacytempents.h"
  12. #include "tier0/vprof.h"
  13. // memdbgon must be the last include file in a .cpp file!!!
  14. #include "tier0/memdbgon.h"
  15. //-----------------------------------------------------------------------------
  16. // Purpose: Bubble Trail TE
  17. //-----------------------------------------------------------------------------
  18. class C_TEBubbleTrail : public C_BaseTempEntity
  19. {
  20. public:
  21. DECLARE_CLASS( C_TEBubbleTrail, C_BaseTempEntity );
  22. DECLARE_CLIENTCLASS();
  23. C_TEBubbleTrail( void );
  24. virtual ~C_TEBubbleTrail( void );
  25. virtual void PostDataUpdate( DataUpdateType_t updateType );
  26. public:
  27. Vector m_vecMins;
  28. Vector m_vecMaxs;
  29. float m_flWaterZ;
  30. int m_nModelIndex;
  31. int m_nCount;
  32. float m_fSpeed;
  33. };
  34. //-----------------------------------------------------------------------------
  35. // Purpose:
  36. //-----------------------------------------------------------------------------
  37. C_TEBubbleTrail::C_TEBubbleTrail( void )
  38. {
  39. m_vecMins.Init();
  40. m_vecMaxs.Init();
  41. m_flWaterZ = 0.0;
  42. m_nModelIndex = 0;
  43. m_nCount = 0;
  44. m_fSpeed = 0;
  45. }
  46. //-----------------------------------------------------------------------------
  47. // Purpose:
  48. //-----------------------------------------------------------------------------
  49. C_TEBubbleTrail::~C_TEBubbleTrail( void )
  50. {
  51. }
  52. void TE_BubbleTrail( IRecipientFilter& filter, float delay,
  53. const Vector* mins, const Vector* maxs, float flWaterZ, int modelindex, int count, float speed )
  54. {
  55. tempents->BubbleTrail( *mins, *maxs, flWaterZ, modelindex, count, speed );
  56. }
  57. //-----------------------------------------------------------------------------
  58. // Purpose:
  59. // Input : bool -
  60. //-----------------------------------------------------------------------------
  61. void C_TEBubbleTrail::PostDataUpdate( DataUpdateType_t updateType )
  62. {
  63. VPROF( "C_TEBubbleTrail::PostDataUpdate" );
  64. tempents->BubbleTrail( m_vecMins, m_vecMaxs, m_flWaterZ, m_nModelIndex, m_nCount, m_fSpeed );
  65. }
  66. IMPLEMENT_CLIENTCLASS_EVENT_DT(C_TEBubbleTrail, DT_TEBubbleTrail, CTEBubbleTrail)
  67. RecvPropVector( RECVINFO(m_vecMins)),
  68. RecvPropVector( RECVINFO(m_vecMaxs)),
  69. RecvPropInt( RECVINFO(m_nModelIndex)),
  70. RecvPropFloat( RECVINFO(m_flWaterZ )),
  71. RecvPropInt( RECVINFO(m_nCount)),
  72. RecvPropFloat( RECVINFO(m_fSpeed )),
  73. END_RECV_TABLE()