aboutsummaryrefslogtreecommitdiff
path: root/mp/src/game/client/c_func_occluder.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_func_occluder.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_func_occluder.cpp')
-rw-r--r--mp/src/game/client/c_func_occluder.cpp51
1 files changed, 51 insertions, 0 deletions
diff --git a/mp/src/game/client/c_func_occluder.cpp b/mp/src/game/client/c_func_occluder.cpp
new file mode 100644
index 00000000..26367820
--- /dev/null
+++ b/mp/src/game/client/c_func_occluder.cpp
@@ -0,0 +1,51 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//
+//=============================================================================//
+#include "cbase.h"
+
+// memdbgon must be the last include file in a .cpp file!!!
+#include "tier0/memdbgon.h"
+
+class C_FuncOccluder : public C_BaseEntity
+{
+public:
+ DECLARE_CLIENTCLASS();
+ DECLARE_CLASS( C_FuncOccluder, C_BaseEntity );
+
+// Overrides.
+public:
+ virtual bool ShouldDraw();
+ virtual int DrawModel( int flags );
+ virtual void OnDataChanged( DataUpdateType_t updateType );
+
+private:
+ int m_nOccluderIndex;
+ bool m_bActive;
+};
+
+IMPLEMENT_CLIENTCLASS_DT( C_FuncOccluder, DT_FuncOccluder, CFuncOccluder )
+ RecvPropBool( RECVINFO( m_bActive ) ),
+ RecvPropInt( RECVINFO(m_nOccluderIndex) ),
+END_RECV_TABLE()
+
+
+void C_FuncOccluder::OnDataChanged( DataUpdateType_t updateType )
+{
+ BaseClass::OnDataChanged( updateType );
+ engine->ActivateOccluder( m_nOccluderIndex, m_bActive );
+}
+
+bool C_FuncOccluder::ShouldDraw()
+{
+ return false;
+}
+
+int C_FuncOccluder::DrawModel( int flags )
+{
+ Assert(0);
+ return 0;
+}