added TE compatibility to TF2

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401593
This commit is contained in:
Borja Ferrer
2007-10-16 17:17:08 +00:00
parent 147643591d
commit 501db6ee8b
3 changed files with 62 additions and 5 deletions
+11 -3
View File
@@ -273,6 +273,7 @@ void TempEntityManager::Initialize()
m_Loaded = false;
/* Read our sigs and offsets from the config file */
#if defined PLATFORM_WINDOWS
if (!g_pGameConf->GetMemSig("CBaseTempEntity", &addr) || !addr)
{
return;
@@ -281,6 +282,16 @@ void TempEntityManager::Initialize()
{
return;
}
/* Store the head of the TE linked list */
m_ListHead = **(void ***)((unsigned char *)addr + offset);
#else
if (!g_pGameConf->GetMemSig("s_pTempEntities", &offset))
{
return;
}
/* Store the head of the TE linked list */
m_ListHead = *(void **)addr;
#endif
if (!g_pGameConf->GetOffset("GetTEName", &m_NameOffs))
{
return;
@@ -294,9 +305,6 @@ void TempEntityManager::Initialize()
return;
}
/* Store the head of the TE linked list */
m_ListHead = **(void ***)((unsigned char *)addr + offset);
/* Create our trie */
m_TempEntInfo = adtfactory->CreateBasicTrie();