Fix OnDrawObject pattern for current scenesystem build; mesh stride 0x68->0x70

This commit is contained in:
2026-08-05 15:46:43 +02:00
parent 94b028d37b
commit 168a42e508
2 changed files with 2 additions and 2 deletions
@@ -20,7 +20,7 @@ static CChams g_CChams{};
namespace ChamsMesh namespace ChamsMesh
{ {
// stride of one CMeshData entry in the mesh draw array // stride of one CMeshData entry in the mesh draw array
constexpr std::size_t MESH_STRIDE = 0x68; constexpr std::size_t MESH_STRIDE = 0x70;
// CMeshData.pSceneAnimatableObject // CMeshData.pSceneAnimatableObject
constexpr std::size_t SCENE_OBJECT_OFFSET = 0x18; constexpr std::size_t SCENE_OBJECT_OFFSET = 0x18;
@@ -77,7 +77,7 @@ auto CHook_Loader::InstallSecondHook() -> bool
{ { XorStr("Hook::IsLoadoutAllowed") , XorStr("48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC ? 48 8B E9 48 8B 0D ? ? ? ? ? ? ? FF 50") , CLIENT_DLL } ,&Hook_IsLoadoutAllowed , reinterpret_cast<LPVOID*>(&IsLoadoutAllowed_o) , true , true } , { { XorStr("Hook::IsLoadoutAllowed") , XorStr("48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC ? 48 8B E9 48 8B 0D ? ? ? ? ? ? ? FF 50") , CLIENT_DLL } ,&Hook_IsLoadoutAllowed , reinterpret_cast<LPVOID*>(&IsLoadoutAllowed_o) , true , true } ,
{ { XorStr( "Hook::EquipItemInLoadout" ) , XorStr( "48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 89 54 24 ? 57 41 54 41 55 41 56 41 57 48 83 EC ? 0F B7 FA" ) , CLIENT_DLL } ,& Hook_EquipItemInLoadout , reinterpret_cast<LPVOID*>( &EquipItemInLoadout_o ) }, { { XorStr( "Hook::EquipItemInLoadout" ) , XorStr( "48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 89 54 24 ? 57 41 54 41 55 41 56 41 57 48 83 EC ? 0F B7 FA" ) , CLIENT_DLL } ,& Hook_EquipItemInLoadout , reinterpret_cast<LPVOID*>( &EquipItemInLoadout_o ) },
{ { XorStr( "Hook::DrawGlow" ) , XorStr( "40 53 48 83 EC 20 48 8B 54" ) , CLIENT_DLL } , &Hook_DrawGlow , reinterpret_cast<LPVOID*>( &DrawGlow_o ) }, { { XorStr( "Hook::DrawGlow" ) , XorStr( "40 53 48 83 EC 20 48 8B 54" ) , CLIENT_DLL } , &Hook_DrawGlow , reinterpret_cast<LPVOID*>( &DrawGlow_o ) },
{ { XorStr( "Hook::OnDrawObject" ) , XorStr( "48 8B C4 48 89 50 ? 53" ) , SCENESYSTEM_DLL } , &Hook_OnDrawObject , reinterpret_cast<LPVOID*>( &OnDrawObject_o ) , true , true }, { { XorStr( "Hook::OnDrawObject" ) , XorStr( "48 8B C4 4C 89 40 ? 48 89 50 ? 55 53 41 57" ) , SCENESYSTEM_DLL } , &Hook_OnDrawObject , reinterpret_cast<LPVOID*>( &OnDrawObject_o ) , true , true },
}; };
return InstallHooks(); return InstallHooks();