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

View File

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

View File

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