aboutsummaryrefslogtreecommitdiff
path: root/mp/src/public/renamed_recvtable_compat.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 /mp/src/public/renamed_recvtable_compat.h
downloadsource-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.tar.xz
source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.zip
First version of the SOurce SDK 2013
Diffstat (limited to 'mp/src/public/renamed_recvtable_compat.h')
-rw-r--r--mp/src/public/renamed_recvtable_compat.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/mp/src/public/renamed_recvtable_compat.h b/mp/src/public/renamed_recvtable_compat.h
new file mode 100644
index 00000000..6de4d597
--- /dev/null
+++ b/mp/src/public/renamed_recvtable_compat.h
@@ -0,0 +1,45 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+//=======================================================================================//
+#if !defined( RENAMED_RECVTABLE_COMPAT_H )
+#define RENAMED_RECVTABLE_COMPAT_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+class CRenamedRecvTableInfo;
+
+extern CRenamedRecvTableInfo *g_pRenamedRecvTableInfoHead;
+
+//-----------------------------------------------------------------------------
+// Purpose: Used by NOTE_RENAMED_RECVTABLE() macro.
+//-----------------------------------------------------------------------------
+class CRenamedRecvTableInfo
+{
+public:
+ CRenamedRecvTableInfo( const char *pOldName, const char *pNewName )
+ : m_pOldName( pOldName ),
+ m_pNewName( pNewName )
+ {
+ m_pNext = g_pRenamedRecvTableInfoHead;
+ g_pRenamedRecvTableInfoHead = this;
+ }
+
+public:
+ const char *m_pOldName;
+ const char *m_pNewName;
+ CRenamedRecvTableInfo *m_pNext;
+};
+
+//-----------------------------------------------------------------------------
+// Purpose: To keep from breaking older demos, use this macro to allow the
+// engine to find the new datatable from the old name.
+//-----------------------------------------------------------------------------
+#define NOTE_RENAMED_RECVTABLE( oldname_, newname_ ) \
+ static CRenamedRecvTableInfo g_##oldname_##Register( \
+ #oldname_, \
+ #newname_ \
+ );
+
+
+#endif // RENAMED_RECVTABLE_COMPAT_H