From 3d2ce1f4bb0718660e3900efcd837cc7f030f957 Mon Sep 17 00:00:00 2001 From: Ottermandias Date: Mon, 2 Oct 2023 23:25:15 +0200 Subject: [PATCH] Use ClientStructs hook for CalculateHeight. --- Penumbra/Interop/PathResolving/MetaState.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Penumbra/Interop/PathResolving/MetaState.cs b/Penumbra/Interop/PathResolving/MetaState.cs index 6defe78c..c41d651e 100644 --- a/Penumbra/Interop/PathResolving/MetaState.cs +++ b/Penumbra/Interop/PathResolving/MetaState.cs @@ -70,6 +70,8 @@ public unsafe class MetaState : IDisposable _characterUtility = characterUtility; _config = config; interop.InitializeFromAttributes(this); + _calculateHeightHook = + interop.HookFromAddress((nint)Character.MemberFunctionPointers.CalculateHeight, CalculateHeightDetour); _onModelLoadCompleteHook = interop.HookFromAddress(_humanVTable[58], OnModelLoadCompleteDetour); _getEqpIndirectHook.Enable(); _updateModelsHook.Enable(); @@ -249,8 +251,6 @@ public unsafe class MetaState : IDisposable private delegate ulong CalculateHeightDelegate(Character* character); - // TODO: use client structs - [Signature(Sigs.CalculateHeight, DetourName = nameof(CalculateHeightDetour))] private readonly Hook _calculateHeightHook = null!; private ulong CalculateHeightDetour(Character* character)