aboutsummaryrefslogtreecommitdiff
path: root/sp/src/game/client/c_weapon__stubs.h
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 /sp/src/game/client/c_weapon__stubs.h
downloadsource-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.tar.xz
source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.zip
First version of the SOurce SDK 2013
Diffstat (limited to 'sp/src/game/client/c_weapon__stubs.h')
-rw-r--r--sp/src/game/client/c_weapon__stubs.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/sp/src/game/client/c_weapon__stubs.h b/sp/src/game/client/c_weapon__stubs.h
new file mode 100644
index 00000000..080698bd
--- /dev/null
+++ b/sp/src/game/client/c_weapon__stubs.h
@@ -0,0 +1,39 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#ifndef C_WEAPON__STUBS_H
+#define C_WEAPON__STUBS_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "client_class.h"
+
+// This is an ugly hack to link client classes to weapons for now
+// these will be removed once we predict all weapons, especially TF2 weapons
+#define STUB_WEAPON_CLASS_IMPLEMENT( entityName, className ) \
+ BEGIN_PREDICTION_DATA( className ) \
+ END_PREDICTION_DATA() \
+ LINK_ENTITY_TO_CLASS( entityName, className );
+
+
+#define STUB_WEAPON_CLASS( entityName, className, baseClassName ) \
+ class C_##className : public baseClassName \
+ { \
+ DECLARE_CLASS( C_##className, baseClassName ); \
+ public: \
+ DECLARE_PREDICTABLE(); \
+ DECLARE_CLIENTCLASS(); \
+ C_##className() {}; \
+ private: \
+ C_##className( const C_##className & ); \
+ }; \
+ STUB_WEAPON_CLASS_IMPLEMENT( entityName, C_##className ); \
+ IMPLEMENT_CLIENTCLASS_DT( C_##className, DT_##className, C##className ) \
+ END_RECV_TABLE()
+
+#endif // C_WEAPON__STUBS_H