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.

77 lines
2.1 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 "basetempentity.h"
  15. //-----------------------------------------------------------------------------
  16. // Purpose: Dispatches blood stream tempentity
  17. //-----------------------------------------------------------------------------
  18. class CTERadioIcon : public CBaseTempEntity
  19. {
  20. public:
  21. DECLARE_CLASS( CTERadioIcon, CBaseTempEntity );
  22. CTERadioIcon( const char *name );
  23. virtual ~CTERadioIcon( void );
  24. void Precache( void );
  25. DECLARE_SERVERCLASS();
  26. public:
  27. CNetworkVar( int, m_iAttachToClient );
  28. };
  29. //-----------------------------------------------------------------------------
  30. // Purpose:
  31. // Input : *name -
  32. //-----------------------------------------------------------------------------
  33. CTERadioIcon::CTERadioIcon( const char *name ) :
  34. CBaseTempEntity( name )
  35. {
  36. }
  37. //-----------------------------------------------------------------------------
  38. // Purpose:
  39. //-----------------------------------------------------------------------------
  40. CTERadioIcon::~CTERadioIcon( void )
  41. {
  42. }
  43. void CTERadioIcon::Precache( void )
  44. {
  45. CBaseEntity::PrecacheModel("sprites/radio.vmt");
  46. }
  47. IMPLEMENT_SERVERCLASS_ST(CTERadioIcon, DT_TERadioIcon)
  48. SendPropInt( SENDINFO(m_iAttachToClient), 8, SPROP_UNSIGNED ),
  49. END_SEND_TABLE()
  50. // Singleton to fire StickyBolt objects
  51. static CTERadioIcon g_TERadioIcon( "RadioIcon" );
  52. //-----------------------------------------------------------------------------
  53. // Purpose:
  54. // Input : filter -
  55. // delay -
  56. // pPlayer -
  57. //-----------------------------------------------------------------------------
  58. void TE_RadioIcon( IRecipientFilter& filter, float delay, CBaseEntity *pPlayer )
  59. {
  60. g_TERadioIcon.m_iAttachToClient = pPlayer->entindex();
  61. // Send it over the wire
  62. g_TERadioIcon.Create( filter, delay );
  63. }