added id properties for teame06

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401253
This commit is contained in:
Borja Ferrer 2007-08-01 18:50:27 +00:00
parent 84b41b2a72
commit a1e819f318
3 changed files with 60 additions and 60 deletions

View File

@ -25,61 +25,61 @@
* code used. Additionally, AlliedModders LLC grants this exception * code used. Additionally, AlliedModders LLC grants this exception
* to all derivative works. AlliedModders LLC defines further * to all derivative works. AlliedModders LLC defines further
* exceptions, found in LICENSE.txt (as of this writing, version * exceptions, found in LICENSE.txt (as of this writing, version
* JULY-31-2007), or <http://www.sourcemod.net/license.php>. * JULY-31-2007), or <http://www.sourcemod.net/license.php>.
* *
* Version: $Id$ * Version: $Id$
*/ */
#include "extension.h" #include "extension.h"
void **g_pGameRules = NULL; void **g_pGameRules = NULL;
void *g_EntList = NULL; void *g_EntList = NULL;
#ifdef PLATFORM_WINDOWS #ifdef PLATFORM_WINDOWS
void InitializeValveGlobals() void InitializeValveGlobals()
{ {
char *addr = NULL; char *addr = NULL;
int offset; int offset;
/* g_pGameRules */ /* g_pGameRules */
if (!g_pGameConf->GetMemSig("CreateGameRulesObject", (void **)&addr) || !addr) if (!g_pGameConf->GetMemSig("CreateGameRulesObject", (void **)&addr) || !addr)
{ {
return; return;
} }
if (!g_pGameConf->GetOffset("g_pGameRules", &offset) || !offset) if (!g_pGameConf->GetOffset("g_pGameRules", &offset) || !offset)
{ {
return; return;
} }
g_pGameRules = *reinterpret_cast<void ***>(addr + offset); g_pGameRules = *reinterpret_cast<void ***>(addr + offset);
/* gEntList and/or g_pEntityList */ /* gEntList and/or g_pEntityList */
if (!g_pGameConf->GetMemSig("LevelShutdown", (void **)&addr) || !addr) if (!g_pGameConf->GetMemSig("LevelShutdown", (void **)&addr) || !addr)
{ {
return; return;
} }
if (!g_pGameConf->GetOffset("gEntList", &offset) || !offset) if (!g_pGameConf->GetOffset("gEntList", &offset) || !offset)
{ {
return; return;
} }
g_EntList = *reinterpret_cast<void **>(addr + offset); g_EntList = *reinterpret_cast<void **>(addr + offset);
} }
#elif defined PLATFORM_LINUX #elif defined PLATFORM_LINUX
void InitializeValveGlobals() void InitializeValveGlobals()
{ {
char *addr = NULL; char *addr = NULL;
/* g_pGameRules */ /* g_pGameRules */
if (!g_pGameConf->GetMemSig("g_pGameRules", (void **)&addr) || !addr) if (!g_pGameConf->GetMemSig("g_pGameRules", (void **)&addr) || !addr)
{ {
return; return;
} }
g_pGameRules = reinterpret_cast<void **>(addr); g_pGameRules = reinterpret_cast<void **>(addr);
/* gEntList and/or g_pEntityList */ /* gEntList and/or g_pEntityList */
if (!g_pGameConf->GetMemSig("gEntList", (void **)&addr) || !addr) if (!g_pGameConf->GetMemSig("gEntList", (void **)&addr) || !addr)
{ {
return; return;
} }
g_EntList = reinterpret_cast<void *>(addr); g_EntList = reinterpret_cast<void *>(addr);
} }
#endif #endif

View File

@ -27,7 +27,7 @@
* exceptions, found in LICENSE.txt (as of this writing, version * exceptions, found in LICENSE.txt (as of this writing, version
* JULY-31-2007), or <http://www.sourcemod.net/license.php>. * JULY-31-2007), or <http://www.sourcemod.net/license.php>.
* *
* * Version: $Id$
*/ */
#include <extension.h> #include <extension.h>

View File

@ -10,7 +10,7 @@
* may change at any time. To view the latest information, see: * may change at any time. To view the latest information, see:
* http://www.sourcemod.net/license.php * http://www.sourcemod.net/license.php
* *
* * Version: $Id$
*/ */
#if defined _sdktools_voice_included #if defined _sdktools_voice_included