diff --git a/src/game/structs.hpp b/src/game/structs.hpp index fdeced7..d692857 100644 --- a/src/game/structs.hpp +++ b/src/game/structs.hpp @@ -989,6 +989,8 @@ namespace game }; static_assert(sizeof(playerState_s) == 0x330C); + static_assert(offsetof(playerState_s, gravity) == 0x58); + static_assert(offsetof(playerState_s, speed) == 0x5C); struct pmove_t { diff --git a/src/module/ceg.cpp b/src/module/ceg.cpp index a5f4d6b..486e6a8 100644 --- a/src/module/ceg.cpp +++ b/src/module/ceg.cpp @@ -75,11 +75,28 @@ void ceg::post_load() } }); + signature.add({ + "\x77\x00\x8B\x55\x08\x3B\x17\x0F\x82\x00\x00\x00\x00", "x?xxxxxxx????", [](char* address) + { + utils::hook::nop(address + 7, 6); + } + }); + + signature.add({ + "\x8D\x4D\x00\xE8\x00\x00\x00\x00\x84\xC0\x74\x13\x53", "xx?x????xxxxx", [](char* address) + { + utils::hook::set(address + 10, 0xEB); + } + }); + signature.process(); // Checks on startup utils::hook::set(0x402ED0, 0xC301B0); - utils::hook::set(0x4b9280, 0xC301B0); + utils::hook::set(0x4B9280, 0xC301B0); + + utils::hook(0x4CA310, 0x48A8E0, HOOK_JUMP).install()->quick(); + utils::hook(0x4D0020, 0x41ECE0, HOOK_JUMP).install()->quick(); // Function fixup utils::hook(0x4CA310, game::native::DB_LoadXAssets, HOOK_JUMP).install()->quick();