mirror of
https://github.com/Ottermandias/Glamourer.git
synced 2025-12-12 10:17:23 +01:00
Fix CalculateHeight.
This commit is contained in:
parent
9ed8c9517b
commit
40a684ff46
1 changed files with 7 additions and 7 deletions
|
|
@ -18,7 +18,7 @@ public unsafe class ScalingService : IDisposable
|
|||
_setupMountHook =
|
||||
interop.HookFromAddress<SetupMount>((nint)MountContainer.MemberFunctionPointers.SetupMount, SetupMountDetour);
|
||||
_calculateHeightHook =
|
||||
interop.HookFromAddress<CalculateHeight>((nint)Character.MemberFunctionPointers.CalculateHeight, CalculateHeightDetour);
|
||||
interop.HookFromAddress<CalculateHeight>((nint)ModelContainer.MemberFunctionPointers.CalculateHeight, CalculateHeightDetour);
|
||||
|
||||
_setupMountHook.Enable();
|
||||
_updateOrnamentHook.Enable();
|
||||
|
|
@ -37,7 +37,7 @@ public unsafe class ScalingService : IDisposable
|
|||
private delegate void SetupMount(MountContainer* container, short mountId, uint unk1, uint unk2, uint unk3, byte unk4);
|
||||
private delegate void UpdateOrnament(OrnamentContainer* ornament);
|
||||
private delegate void PlaceMinion(Companion* character);
|
||||
private delegate float CalculateHeight(Character* character);
|
||||
private delegate float CalculateHeight(ModelContainer* character);
|
||||
|
||||
private readonly Hook<SetupMount> _setupMountHook;
|
||||
|
||||
|
|
@ -85,12 +85,12 @@ public unsafe class ScalingService : IDisposable
|
|||
}
|
||||
}
|
||||
|
||||
private float CalculateHeightDetour(Character* character)
|
||||
private float CalculateHeightDetour(ModelContainer* container)
|
||||
{
|
||||
var (gender, bodyType, clan, height) = GetHeightRelevantCustomize(character);
|
||||
SetHeightCustomize(character, character->GameObject.DrawObject);
|
||||
var ret = _calculateHeightHook.Original(character);
|
||||
SetHeightCustomize(character, gender, bodyType, clan, height);
|
||||
var (gender, bodyType, clan, height) = GetHeightRelevantCustomize(container->OwnerObject);
|
||||
SetHeightCustomize(container->OwnerObject, container->OwnerObject->DrawObject);
|
||||
var ret = _calculateHeightHook.Original(container);
|
||||
SetHeightCustomize(container->OwnerObject, gender, bodyType, clan, height);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue