mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-13 12:14:17 +01:00
Redraw player ornament, allow redrawing by index
This commit is contained in:
parent
51dba221c4
commit
13044763cb
1 changed files with 12 additions and 6 deletions
|
|
@ -154,11 +154,11 @@ public sealed unsafe partial class RedrawService : IDisposable
|
||||||
if (gPose)
|
if (gPose)
|
||||||
DisableDraw(actor!);
|
DisableDraw(actor!);
|
||||||
|
|
||||||
if (actor is PlayerCharacter && _objects[tableIndex + 1] is { ObjectKind: ObjectKind.MountType } mount)
|
if (actor is PlayerCharacter && _objects[tableIndex + 1] is { ObjectKind: ObjectKind.MountType or ObjectKind.Ornament } mountOrOrnament)
|
||||||
{
|
{
|
||||||
*ActorDrawState(mount) |= DrawState.Invisibility;
|
*ActorDrawState(mountOrOrnament) |= DrawState.Invisibility;
|
||||||
if (gPose)
|
if (gPose)
|
||||||
DisableDraw(mount);
|
DisableDraw(mountOrOrnament);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -173,11 +173,11 @@ public sealed unsafe partial class RedrawService : IDisposable
|
||||||
if (gPose)
|
if (gPose)
|
||||||
EnableDraw(actor!);
|
EnableDraw(actor!);
|
||||||
|
|
||||||
if (actor is PlayerCharacter && _objects[tableIndex + 1] is { ObjectKind: ObjectKind.MountType } mount)
|
if (actor is PlayerCharacter && _objects[tableIndex + 1] is { ObjectKind: ObjectKind.MountType or ObjectKind.Ornament } mountOrOrnament)
|
||||||
{
|
{
|
||||||
*ActorDrawState(mount) &= ~DrawState.Invisibility;
|
*ActorDrawState(mountOrOrnament) &= ~DrawState.Invisibility;
|
||||||
if (gPose)
|
if (gPose)
|
||||||
EnableDraw(mount);
|
EnableDraw(mountOrOrnament);
|
||||||
}
|
}
|
||||||
|
|
||||||
GameObjectRedrawn?.Invoke(actor!.Address, tableIndex);
|
GameObjectRedrawn?.Invoke(actor!.Address, tableIndex);
|
||||||
|
|
@ -323,6 +323,12 @@ public sealed unsafe partial class RedrawService : IDisposable
|
||||||
"mouseover" => (_targets.MouseOverTarget, true),
|
"mouseover" => (_targets.MouseOverTarget, true),
|
||||||
_ => (null, false),
|
_ => (null, false),
|
||||||
};
|
};
|
||||||
|
if (!ret && lowerName.Length > 1 && lowerName[0] == '#' && ushort.TryParse(lowerName[1..], out var objectIndex))
|
||||||
|
{
|
||||||
|
ret = true;
|
||||||
|
actor = _objects[objectIndex];
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue