aboutsummaryrefslogtreecommitdiff
path: root/mp/src/game/client/c_te_killplayerattachments.cpp
diff options
context:
space:
mode:
authorJoe Ludwig <[email protected]>2013-06-26 15:22:04 -0700
committerJoe Ludwig <[email protected]>2013-06-26 15:22:04 -0700
commit39ed87570bdb2f86969d4be821c94b722dc71179 (patch)
treeabc53757f75f40c80278e87650ea92808274aa59 /mp/src/game/client/c_te_killplayerattachments.cpp
downloadsource-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.tar.xz
source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.zip
First version of the SOurce SDK 2013
Diffstat (limited to 'mp/src/game/client/c_te_killplayerattachments.cpp')
-rw-r--r--mp/src/game/client/c_te_killplayerattachments.cpp69
1 files changed, 69 insertions, 0 deletions
diff --git a/mp/src/game/client/c_te_killplayerattachments.cpp b/mp/src/game/client/c_te_killplayerattachments.cpp
new file mode 100644
index 00000000..60cb0078
--- /dev/null
+++ b/mp/src/game/client/c_te_killplayerattachments.cpp
@@ -0,0 +1,69 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $Workfile: $
+// $Date: $
+// $NoKeywords: $
+//=============================================================================//
+#include "cbase.h"
+#include "c_basetempentity.h"
+#include "c_te_legacytempents.h"
+#include "tier0/vprof.h"
+
+// memdbgon must be the last include file in a .cpp file!!!
+#include "tier0/memdbgon.h"
+
+//-----------------------------------------------------------------------------
+// Purpose: Kills Player Attachments
+//-----------------------------------------------------------------------------
+class C_TEKillPlayerAttachments : public C_BaseTempEntity
+{
+public:
+ DECLARE_CLASS( C_TEKillPlayerAttachments, C_BaseTempEntity );
+ DECLARE_CLIENTCLASS();
+
+ C_TEKillPlayerAttachments( void );
+ virtual ~C_TEKillPlayerAttachments( void );
+
+ virtual void PostDataUpdate( DataUpdateType_t updateType );
+
+public:
+ int m_nPlayer;
+};
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+C_TEKillPlayerAttachments::C_TEKillPlayerAttachments( void )
+{
+ m_nPlayer = 0;
+}
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+C_TEKillPlayerAttachments::~C_TEKillPlayerAttachments( void )
+{
+}
+
+//-----------------------------------------------------------------------------
+// Purpose:
+// Input : bool -
+//-----------------------------------------------------------------------------
+void C_TEKillPlayerAttachments::PostDataUpdate( DataUpdateType_t updateType )
+{
+ VPROF( "C_TEKillPlayerAttachments::PostDataUpdate" );
+
+ tempents->KillAttachedTents( m_nPlayer );
+}
+
+void TE_KillPlayerAttachments( IRecipientFilter& filter, float delay,
+ int player )
+{
+ tempents->KillAttachedTents( player );
+}
+
+IMPLEMENT_CLIENTCLASS_EVENT_DT(C_TEKillPlayerAttachments, DT_TEKillPlayerAttachments, CTEKillPlayerAttachments)
+ RecvPropInt( RECVINFO(m_nPlayer)),
+END_RECV_TABLE()