diff --git a/spt/OrangeBox/modules/ClientDLL.cpp b/spt/OrangeBox/modules/ClientDLL.cpp index 897006f59..a3fd657ef 100644 --- a/spt/OrangeBox/modules/ClientDLL.cpp +++ b/spt/OrangeBox/modules/ClientDLL.cpp @@ -147,7 +147,7 @@ void ClientDLL::Hook(const std::wstring& moduleName, HMODULE hModule, uintptr_t else { EngineDevWarning("[client dll] Could not find CHLClient::HudUpdate.\n"); - EngineWarning("y_spt_afterframes has no effect.\n"); + EngineWarning("_y_spt_afterframes has no effect.\n"); } // GetButtonBits diff --git a/spt/OrangeBox/modules/EngineDLL.cpp b/spt/OrangeBox/modules/EngineDLL.cpp index 38971652a..2b59d15d3 100644 --- a/spt/OrangeBox/modules/EngineDLL.cpp +++ b/spt/OrangeBox/modules/EngineDLL.cpp @@ -74,10 +74,18 @@ void EngineDLL::Hook(const std::wstring& moduleName, HMODULE hModule, uintptr_t pM_bLoadgame = (*(bool **)(pSpawnPlayer + 8)); pGameServer = (*(void **)(pSpawnPlayer + 21)); break; + + case 4: + pM_bLoadgame = (*(bool **)(pSpawnPlayer + 26)); + //pGameServer = (*(void **)(pSpawnPlayer + 21)); - We get this one from SV_ActivateServer in OE. + break; } EngineDevMsg("m_bLoadGame is situated at %p.\n", pM_bLoadgame); + +#if !defined( OE ) EngineDevMsg("pGameServer is %p.\n", pGameServer); +#endif } else { @@ -91,12 +99,23 @@ void EngineDLL::Hook(const std::wstring& moduleName, HMODULE hModule, uintptr_t { ORIG_SV_ActivateServer = (_SV_ActivateServer)pSV_ActivateServer; EngineDevMsg("Found SV_ActivateServer at %p (using the build %s pattern).\n", pSV_ActivateServer, Patterns::ptnsSV_ActivateServer[ptnNumber].build.c_str()); + + switch (ptnNumber) + { + case 3: + pGameServer = (*(void **)(pSV_ActivateServer + 223)); + break; + } + +#if defined( OE ) + EngineDevMsg("pGameServer is %p.\n", pGameServer); +#endif } else { EngineDevWarning("Could not find SV_ActivateServer!\n"); EngineWarning("y_spt_pause 2 has no effect.\n"); - EngineWarning("y_spt_afterframes_reset_on_server_activate has no effect.\n"); + EngineWarning("_y_spt_afterframes_reset_on_server_activate has no effect.\n"); } // FinishRestore diff --git a/spt/OrangeBox/modules/ServerDLL.cpp b/spt/OrangeBox/modules/ServerDLL.cpp index 412368110..ae6fc58bb 100644 --- a/spt/OrangeBox/modules/ServerDLL.cpp +++ b/spt/OrangeBox/modules/ServerDLL.cpp @@ -93,6 +93,11 @@ void ServerDLL::Hook(const std::wstring& moduleName, HMODULE hModule, uintptr_t off1M_nOldButtons = 2; off2M_nOldButtons = 40; break; + + case 8: + off1M_nOldButtons = 1; + off2M_nOldButtons = 40; + break; } } else @@ -162,6 +167,10 @@ void ServerDLL::Hook(const std::wstring& moduleName, HMODULE hModule, uintptr_t case 7: offM_vecAbsVelocity = 532; break; + + case 8: + offM_vecAbsVelocity = 592; + break; } } else diff --git a/spt/OrangeBox/patterns.hpp b/spt/OrangeBox/patterns.hpp index 409f96d84..84fa8157a 100644 --- a/spt/OrangeBox/patterns.hpp +++ b/spt/OrangeBox/patterns.hpp @@ -37,6 +37,14 @@ namespace Patterns 0x55, 0x8B, 0xEC, 0x83, 0xEC, 0x14, 0x80, 0x3D, '?', '?', '?', '?', 0x00, 0x56, 0x8B, 0xF1, 0x74, '?', 0x6A, 0x00, 0xB9, '?', '?', '?', '?', 0xE8, '?', '?', '?', '?', 0xEB, 0x1F, 0x8B, 0x0D, '?', '?', '?', '?', 0xFF, 0xB6, '?', '?', '?', '?', 0x8B, 0x01, 0xFF, 0x50, 0x0C, 0xFF, 0xB6, '?', '?', '?', '?', 0xE8, '?', '?', '?', '?', 0x83, 0xC4, 0x04, 0x8B, 0x46, 0x0C, 0x8D, 0x4E, 0x04, 0x40 }, "xxxxxxxx????xxxxx?xxx????x????xxxx????xx????xxxxxxx????x????xxxxxxxxxx" + }, + + { + "2707", + { + 0x64, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xFF, 0x68, '?', '?', '?', '?', 0x50, 0x64, 0x89, 0x25, 0x00, 0x00, 0x00, 0x00, 0x83, 0xEC, 0x14, 0x80, 0x3D, '?', '?', '?', '?', 0x00, 0x56, 0x8B, 0xF1, 0x74, 0x0E, 0x6A, 0x00, 0xB9, '?', '?', '?', '?', 0xE8, '?', '?', '?', '?', 0xEB, 0x21, 0x8B, 0x0D + }, + "xxxxxxxxx????xxxxxxxxxxxxx????xxxxxxxxx????x????xxxx" } }; @@ -64,6 +72,14 @@ namespace Patterns 0x55, 0x8B, 0xEC, 0x83, 0xEC, 0x0C, 0x53, 0x8B, 0x1D, '?', '?', '?', '?', 0x57, 0x68, '?', '?', '?', '?', 0xFF, 0xD3, 0x83, 0xC4, 0x04, 0xE8, '?', '?', '?', '?', 0x6A, 0x0B }, "xxxxxxxxx????xx????xxxxxx????xx" + }, + + { + "2707", + { + 0x6A, 0xFF, 0x68, '?', '?', '?', '?', 0x64, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x50, 0x64, 0x89, 0x25, 0x00, 0x00, 0x00, 0x00, 0x51, 0x68, '?', '?', '?', '?', 0xE8, '?', '?', '?', '?', 0x83, 0xC4, 0x04, 0xE8, '?', '?', '?', '?', 0x8B, 0x10, 0x6A, 0x0B, 0x8B, 0xC8, 0xFF, 0x92 + }, + "xxx????xxxxxxxxxxxxxxxx????x????xxxx????xxxxxxxx" } }; @@ -91,6 +107,14 @@ namespace Patterns 0x55, 0x8B, 0xEC, 0x81, 0xEC, 0xA4, 0x06, 0x00, 0x00, 0x33, 0xC0, 0x53, 0x8B, 0xD9, 0x89, 0x85, 0x5C, 0xF9, 0xFF, 0xFF, 0x8D, 0x8D, 0x74, 0xF9, 0xFF, 0xFF }, "xxxxxxxxxxxxxxxxxxxxxxxxxx" + }, + + { + "2707", + { + 0x55, 0x8B, 0xEC, 0x83, 0xE4, 0xF8, 0x81, 0xEC, 0x8C, 0x06, 0x00, 0x00, 0x55, 0x56, 0x57, 0x8B, 0xE9, 0x80, 0xBD, '?', '?', '?', '?', 0x00, 0x0F, 0x84, 0xC0, 0x00, 0x00, 0x00 + }, + "xxxxxxxxxxxxxxxxxxx????xxxxxxx" } }; @@ -126,6 +150,14 @@ namespace Patterns 0x55, 0x8B, 0xEC, 0x83, 0xEC, 0x14, 0x56, 0x8B, 0xF1, 0x8B, 0x06, 0x8B, 0x40, '?', 0xFF, 0xD0, 0x84, 0xC0, 0x74, '?', 0x8B, 0x06, 0x8B, 0xCE, 0x8B, 0x40, '?', 0xFF, 0xD0, 0x84, 0xC0, 0x74, '?', 0x8A, 0x4D, 0x08, 0x33, 0xC0, 0x84, 0xC9, 0x88, 0x4D, 0xFC, 0x6A, 0x00 }, "xxxxxxxxxxxxx?xxxxx?xxxxxx?xxxxx?xxxxxxxxxxxx" + }, + + { + "2707", + { + 0x64, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x6A, 0xFF, 0x68, '?', '?', '?', '?', 0x50, 0x64, 0x89, 0x25, 0x00, 0x00, 0x00, 0x00, 0x83, 0xEC, 0x14, 0x56, 0x8B, 0xF1, 0x8B, 0x06, 0xFF, 0x50, '?', 0x84, 0xC0, 0x74, 0x59, 0x8B, 0x16, 0x8B, 0xCE, 0xFF, 0x52 + }, + "xxxxxxxxx????xxxxxxxxxxxxxxxxxx?xxxxxxxxxx" } }; @@ -240,6 +272,14 @@ namespace Patterns 0x55, 0x8B, 0xEC, 0x51, 0xA1, '?', '?', '?', '?', 0xF3, 0x0F, 0x10, 0x40, 0x10, 0x56, 0xF3, 0x0F, 0x11, 0x45, 0xFC, 0x83, 0xEC, 0x08, 0x0F, 0x5A, 0xC0, 0xF2, 0x0F, 0x11, 0x04, 0x24, 0xE8, '?', '?', '?', '?', 0x8B, 0xC8 }, "xxxxx????xxxxxxxxxxxxxxxxxxxxxxx????xx" + }, + + { + "2707", + { + 0x51, 0xA1, '?', '?', '?', '?', 0x8B, 0x48, 0x10, 0x89, 0x4C, 0x24, 0x00, 0xE8, '?', '?', '?', '?', 0xD9, 0x44, 0x24, 0x00, 0x83, 0xEC, 0x08, 0xDD, 0x1C, 0x24, 0xE8, '?', '?', '?', '?', 0x8B, 0xC8, 0xE8 + }, + "xx????xxxxxxxx????xxxxxxxxxxx????xxx" } }; @@ -267,6 +307,14 @@ namespace Patterns 0x55, 0x8B, 0xEC, 0x51, 0x8B, 0x15, '?', '?', '?', '?', 0xB8, 0x00, 0x00, 0x02, 0x00, 0x53, 0x56, 0x33, 0xF6, 0x8B, 0xD9, 0xF6, 0xC2, 0x03, 0xB9, 0xFD, 0xFF, 0xFF, 0xFF, 0x57, 0x0F, 0x45, 0xF0, 0xBF, 0xFC, 0xFF, 0xFF, 0xFF }, "xxxxxx????xxxxxxxxxxxxxxxxxxxxxxxxxxxx" + }, + + { + "2707", + { + 0x51, 0xA0, '?', '?', '?', '?', 0xB2, 0x03, 0x84, 0xC2, 0xC7, 0x44, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x08, 0xC7, 0x44, 0x24, 0x00, 0x00, 0x00, 0x02, 0x00, 0x8B, 0x0D, '?', '?', '?', '?', 0xF7, 0xC1, 0x00, 0x00, 0x02, 0x00 + }, + "xx????xxxxxxxxxxxxxxxxxxxxxxxx????xxxxxx" } }; @@ -378,6 +426,14 @@ namespace Patterns 0x55, 0x8B, 0xEC, 0x83, 0xEC, 0x20, 0x56, 0x8B, 0xF1, 0x8B, 0x4E, 0x04, 0x80, 0xB9, 0x44, 0x0A, 0x00, 0x00, 0x00, 0x74, 0x0E, 0x8B, 0x76, 0x08, 0x83, 0x4E, 0x28, 0x02, 0x32, 0xC0, 0x5E, 0x8B, 0xE5, 0x5D, 0xC3, 0xF3, 0x0F, 0x10, 0x89, 0xB0, 0x0D, 0x00, 0x00, 0x0F, 0x57, 0xC0, 0x0F, 0x2E }, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + }, + + { + "2707", + { + 0x83, 0xEC, 0x10, 0x53, 0x56, 0x8B, 0xF1, 0x8B, 0x4E, 0x08, 0x8A, 0x81, '?', '?', '?', '?', 0x84, 0xC0, 0x74, 0x0F, 0x8B, 0x76, 0x04, 0x83, 0x4E, '?', 0x02, 0x5E, 0x32, 0xC0, 0x5B, 0x83, 0xC4, 0x10, 0xC3, 0xD9, 0x81, 0x30, 0x0C, 0x00, 0x00, 0xD8, 0x1D + }, + "xxxxxxxxxxxx????xxxxxxxxx?xxxxxxxxxxxxxxxxx" } }; @@ -456,6 +512,14 @@ namespace Patterns 0x55, 0x8B, 0xEC, 0x56, 0x8B, 0x75, 0x08, 0x57, 0x8B, 0xF9, 0x33, 0xC0, 0x88, 0x87, 0xB4, 0x0B, 0x00, 0x00, 0x39, 0x87, 0x58, 0x0A, 0x00, 0x00, 0x75, 0x1B, 0xD9, 0x46, 0x0C, 0xD9, 0x9F, 0x48, 0x0A, 0x00, 0x00, 0xD9, 0x46, 0x10, 0xD9, 0x9F, 0x4C, 0x0A, 0x00, 0x00, 0xD9, 0x46, 0x14, 0xD9 }, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + }, + + { + "2707", + { + 0x8B, 0x81, '?', '?', '?', '?', 0x8B, 0x54, 0x24, 0x04, 0x53, 0x33, 0xDB, 0x3B, 0xC3, 0x88, 0x99, 0x2C, 0x0A, 0x00, 0x00, 0x75, 0x1B, 0x8B, 0x42, 0x0C, 0x89, 0x81, 0xFC, 0x08, 0x00, 0x00, 0x8B, 0x42, 0x10, 0x89, 0x81, 0x00, 0x09, 0x00, 0x00, 0x8B, 0x42, 0x14, 0x89, 0x81, 0x04, 0x09, 0x00 + }, + "xx????xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" } }; }