summaryrefslogtreecommitdiff
path: root/game/server/cstrike/te_radioicon.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'game/server/cstrike/te_radioicon.cpp')
-rw-r--r--game/server/cstrike/te_radioicon.cpp77
1 files changed, 77 insertions, 0 deletions
diff --git a/game/server/cstrike/te_radioicon.cpp b/game/server/cstrike/te_radioicon.cpp
new file mode 100644
index 0000000..771ce9f
--- /dev/null
+++ b/game/server/cstrike/te_radioicon.cpp
@@ -0,0 +1,77 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $Workfile: $
+// $Date: $
+//
+//-----------------------------------------------------------------------------
+// $Log: $
+//
+// $NoKeywords: $
+//=============================================================================//
+#include "cbase.h"
+#include "basetempentity.h"
+
+//-----------------------------------------------------------------------------
+// Purpose: Dispatches blood stream tempentity
+//-----------------------------------------------------------------------------
+class CTERadioIcon : public CBaseTempEntity
+{
+public:
+ DECLARE_CLASS( CTERadioIcon, CBaseTempEntity );
+
+ CTERadioIcon( const char *name );
+ virtual ~CTERadioIcon( void );
+
+ void Precache( void );
+
+ DECLARE_SERVERCLASS();
+
+public:
+
+ CNetworkVar( int, m_iAttachToClient );
+};
+
+//-----------------------------------------------------------------------------
+// Purpose:
+// Input : *name -
+//-----------------------------------------------------------------------------
+CTERadioIcon::CTERadioIcon( const char *name ) :
+ CBaseTempEntity( name )
+{
+}
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+CTERadioIcon::~CTERadioIcon( void )
+{
+}
+
+void CTERadioIcon::Precache( void )
+{
+ CBaseEntity::PrecacheModel("sprites/radio.vmt");
+}
+
+IMPLEMENT_SERVERCLASS_ST(CTERadioIcon, DT_TERadioIcon)
+ SendPropInt( SENDINFO(m_iAttachToClient), 8, SPROP_UNSIGNED ),
+END_SEND_TABLE()
+
+
+// Singleton to fire StickyBolt objects
+static CTERadioIcon g_TERadioIcon( "RadioIcon" );
+
+//-----------------------------------------------------------------------------
+// Purpose:
+// Input : filter -
+// delay -
+// pPlayer -
+//-----------------------------------------------------------------------------
+void TE_RadioIcon( IRecipientFilter& filter, float delay, CBaseEntity *pPlayer )
+{
+ g_TERadioIcon.m_iAttachToClient = pPlayer->entindex();
+
+ // Send it over the wire
+ g_TERadioIcon.Create( filter, delay );
+}