summaryrefslogtreecommitdiff
path: root/game/client/c_weapon__stubs.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/client/c_weapon__stubs.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/client/c_weapon__stubs.h')
-rw-r--r--game/client/c_weapon__stubs.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/game/client/c_weapon__stubs.h b/game/client/c_weapon__stubs.h
new file mode 100644
index 0000000..9b48d12
--- /dev/null
+++ b/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