mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 10:17:22 +01:00
Further fixes.
This commit is contained in:
parent
e3a1ae6938
commit
5599f12753
3 changed files with 8 additions and 8 deletions
|
|
@ -14,19 +14,19 @@ public sealed unsafe class CalculateHeight : FastHook<CalculateHeight.Delegate>
|
|||
{
|
||||
_collectionResolver = collectionResolver;
|
||||
_metaState = metaState;
|
||||
Task = hooks.CreateHook<Delegate>("Calculate Height", (nint)HeightContainer.MemberFunctionPointers.CalculateHeight, Detour,
|
||||
Task = hooks.CreateHook<Delegate>("Calculate Height", (nint)Character.MemberFunctionPointers.CalculateHeight, Detour,
|
||||
!HookOverrides.Instance.Meta.CalculateHeight);
|
||||
}
|
||||
|
||||
public delegate ulong Delegate(HeightContainer* character);
|
||||
public delegate ulong Delegate(Character* character);
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
|
||||
private ulong Detour(HeightContainer* container)
|
||||
private ulong Detour(Character* character)
|
||||
{
|
||||
var collection = _collectionResolver.IdentifyCollection((GameObject*)container->OwnerObject, true);
|
||||
var collection = _collectionResolver.IdentifyCollection((GameObject*)character, true);
|
||||
_metaState.RspCollection.Push(collection);
|
||||
var ret = Task.Result.Original.Invoke(container);
|
||||
Penumbra.Log.Excessive($"[Calculate Height] Invoked on {(nint)container:X} -> {ret}.");
|
||||
var ret = Task.Result.Original.Invoke(character);
|
||||
Penumbra.Log.Excessive($"[Calculate Height] Invoked on {(nint)character:X} -> {ret}.");
|
||||
_metaState.RspCollection.Pop();
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ public sealed unsafe class CollectionResolver(
|
|||
}
|
||||
|
||||
// Only handle human models.
|
||||
if (!IsModelHuman((uint)actor.AsCharacter->ModelCharaId))
|
||||
if (!IsModelHuman((uint)actor.AsCharacter->ModelContainer.ModelCharaId))
|
||||
return null;
|
||||
|
||||
if (actor.Customize->Data[0] == 0)
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ public class ResourceTree
|
|||
Unsafe.AsPointer(ref character->DrawData.EquipmentModelIds[0]), 10),
|
||||
_ => [],
|
||||
};
|
||||
ModelId = character->ModelCharaId;
|
||||
ModelId = character->ModelContainer.ModelCharaId;
|
||||
CustomizeData = character->DrawData.CustomizeData;
|
||||
RaceCode = human != null ? (GenderRace)human->RaceSexId : GenderRace.Unknown;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue