mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Fix offsets.
This commit is contained in:
parent
68c782f0b9
commit
bc068f9913
2 changed files with 4 additions and 5 deletions
|
|
@ -22,13 +22,12 @@ public sealed unsafe class GetEqpIndirect : FastHook<GetEqpIndirect.Delegate>
|
|||
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
|
||||
private void Detour(DrawObject* drawObject)
|
||||
{
|
||||
if ((*(byte*)(drawObject + Offsets.GetEqpIndirectSkip1) & 1) == 0 || *(ulong*)(drawObject + Offsets.GetEqpIndirectSkip2) == 0)
|
||||
// Shortcut because this is also called all the time.
|
||||
// Same thing is checked at the beginning of the original function.
|
||||
if ((*(byte*)((nint)drawObject + Offsets.GetEqpIndirectSkip1) & 1) == 0 || *(ulong*)((nint)drawObject + Offsets.GetEqpIndirectSkip2) == 0)
|
||||
return;
|
||||
|
||||
Penumbra.Log.Excessive($"[Get EQP Indirect] Invoked on {(nint)drawObject:X}.");
|
||||
// Shortcut because this is also called all the time.
|
||||
// Same thing is checked at the beginning of the original function.
|
||||
|
||||
var collection = _collectionResolver.IdentifyCollection(drawObject, true);
|
||||
using var eqp = _metaState.ResolveEqpData(collection.ModCollection);
|
||||
Task.Result.Original(drawObject);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public sealed unsafe class UpdateModel : FastHook<UpdateModel.Delegate>
|
|||
{
|
||||
// Shortcut because this is called all the time.
|
||||
// Same thing is checked at the beginning of the original function.
|
||||
if (*(int*)(drawObject + Offsets.UpdateModelSkip) == 0)
|
||||
if (*(int*)((nint)drawObject + Offsets.UpdateModelSkip) == 0)
|
||||
return;
|
||||
|
||||
Penumbra.Log.Excessive($"[Update Model] Invoked on {(nint)drawObject:X}.");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue