diff --git a/extensions/sdktools/tempents.cpp b/extensions/sdktools/tempents.cpp index 0809bcf4..e179a475 100644 --- a/extensions/sdktools/tempents.cpp +++ b/extensions/sdktools/tempents.cpp @@ -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(); diff --git a/gamedata/sdktools.games.ep2.txt b/gamedata/sdktools.games.ep2.txt index 48b51fda..63c373fe 100644 --- a/gamedata/sdktools.games.ep2.txt +++ b/gamedata/sdktools.games.ep2.txt @@ -1,3 +1,49 @@ "Games" { + /* General Temp Entities */ + "#default" + { + "#supported" + { + "game" "tf" + } + + "Offsets" + { + /* Offset into CBaseTempEntity constructor */ + "s_pTempEntities" + { + "windows" "17" + } + "GetTEName" + { + "windows" "4" + "linux" "4" + } + "GetTENext" + { + "windows" "8" + "linux" "8" + } + "TE_GetServerClass" + { + "windows" "0" + "linux" "0" + } + } + + "Signatures" + { + "CBaseTempEntity" + { + "library" "server" + "windows" "\x8B\xC1\x8B\x4C\x24\x04\xC7\x00\x2A\x2A\x2A\x2A\x89\x48\x04\x8B\x15\x2A\x2A\x2A\x2A\x89\x50\x08\xA3\x2A\x2A\x2A\x2A\xC2\x04\x00" + } + "s_pTempEntities" + { + "library" "server" + "linux" "@_ZN15CBaseTempEntity15s_pTempEntitiesE" + } + } + } } \ No newline at end of file diff --git a/gamedata/sdktools.games.txt b/gamedata/sdktools.games.txt index ca80a401..51cd12a4 100644 --- a/gamedata/sdktools.games.txt +++ b/gamedata/sdktools.games.txt @@ -47,7 +47,6 @@ "s_pTempEntities" { "windows" "17" - "linux" "27" } "GetTEName" { @@ -72,7 +71,11 @@ { "library" "server" "windows" "\x8B\xC1\x8B\x4C\x24\x04\xC7\x00\x2A\x2A\x2A\x2A\x89\x48\x04\x8B\x15\x2A\x2A\x2A\x2A\x89\x50\x08\xA3\x2A\x2A\x2A\x2A\xC2\x04\x00" - "linux" "@_ZN15CBaseTempEntityC2EPKc" + } + "s_pTempEntities" + { + "library" "server" + "linux" "@_ZN15CBaseTempEntity15s_pTempEntitiesE" } } }