diff --git a/Glamourer/Gui/Tabs/ActorTab/ActorPanel.cs b/Glamourer/Gui/Tabs/ActorTab/ActorPanel.cs index b1fd1f8..04baa06 100644 --- a/Glamourer/Gui/Tabs/ActorTab/ActorPanel.cs +++ b/Glamourer/Gui/Tabs/ActorTab/ActorPanel.cs @@ -419,7 +419,7 @@ public class ActorPanel : "The current target can not be manipulated." : "No valid target selected."; if (!ImGuiUtil.DrawDisabledButton("Apply to Target", Vector2.Zero, tt, - !data.Valid || id == _identifier || _state!.ModelData.ModelId != 0 || _objects.IsInGPose)) + !data.Valid || id == _identifier || _state!.ModelData.ModelId != 0)) return; var (applyGear, applyCustomize) = UiHelpers.ConvertKeysToFlags(); diff --git a/Glamourer/Gui/Tabs/DesignTab/DesignPanel.cs b/Glamourer/Gui/Tabs/DesignTab/DesignPanel.cs index 2cb843b..53f1ef5 100644 --- a/Glamourer/Gui/Tabs/DesignTab/DesignPanel.cs +++ b/Glamourer/Gui/Tabs/DesignTab/DesignPanel.cs @@ -449,7 +449,7 @@ public class DesignPanel ? "Apply the current design with its settings to your current target.\nHold Control to only apply gear.\nHold Shift to only apply customizations." : "The current target can not be manipulated." : "No valid target selected."; - if (!ImGuiUtil.DrawDisabledButton("Apply to Target", Vector2.Zero, tt, !data.Valid || _objects.IsInGPose)) + if (!ImGuiUtil.DrawDisabledButton("Apply to Target", Vector2.Zero, tt, !data.Valid)) return; if (_state.GetOrCreate(id, data.Objects[0], out var state)) diff --git a/Glamourer/Interop/ObjectManager.cs b/Glamourer/Interop/ObjectManager.cs index 15caeee..17f997f 100644 --- a/Glamourer/Interop/ObjectManager.cs +++ b/Glamourer/Interop/ObjectManager.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using Dalamud.Game.ClientState.Objects; using Dalamud.Plugin.Services; +using FFXIVClientStructs.FFXIV.Client.Game.Control; using Glamourer.Interop.Structs; using Glamourer.Services; using Penumbra.GameData.Actors; @@ -152,8 +153,8 @@ public class ObjectManager : IReadOnlyDictionary public Actor Player => _objects.GetObjectAddress(0); - public Actor Target - => _targets.Target?.Address ?? nint.Zero; + public unsafe Actor Target + => _clientState.IsGPosing ? TargetSystem.Instance()->GPoseTarget : TargetSystem.Instance()->Target; public Actor Focus => _targets.FocusTarget?.Address ?? nint.Zero;