diff --git a/Plugins/RynthCore.Plugin.RynthAi/CorpseOpenController.cs b/Plugins/RynthCore.Plugin.RynthAi/CorpseOpenController.cs index 9325311..eebe0ce 100644 --- a/Plugins/RynthCore.Plugin.RynthAi/CorpseOpenController.cs +++ b/Plugins/RynthCore.Plugin.RynthAi/CorpseOpenController.cs @@ -1685,17 +1685,17 @@ public sealed partial class RynthAiPlugin Host.SelectItem(unchecked((uint)firstMatchId)); LootDiag($"[RynthAi] {LootTag}: picking up 0x{(uint)firstMatchId:X8} '{matchItemName}' from corpse 0x{(uint)corpseId:X8}."); - // Jump-loot: jump before the move to cancel the pickup animation. - // Only jump when multiple items remain (single-item: no animation worth cancelling). - // Guards: needs both hooks, stamina > 5 to cover the cost. - int remainingItems = visibleItemCount - _processedCorpseItems.Count; - bool useJumpLoot = settings.LootJumpEnabled - && Host.HasJumpNonAutonomous - && Host.HasMoveItemExternal - && _vitals.CurrentStamina > 5; - - if (useJumpLoot && remainingItems > 1 && !pipelined) - Host.JumpNonAutonomous(Math.Clamp(settings.LootJumpHeight / 100f, 0.01f, 1f)); + // Jump-loot: jump, then the move while the character is still in the air, so the server + // skips the pickup bend-down. The jump is the keyboard one (TapJump, 0xF61B Jump, which + // ACE handles); JumpNonAutonomous (0xF7C9) has no handler on ACE and did nothing. The + // jump goes FIRST: ACE's jump handler stops any walk-to in progress, so a jump after the + // move would cancel the pickup. Every pickup, a corpse's only match included (most + // corpses hold one match, so a multi-item gate meant jump-loot almost never ran), with + // stamina > 5 to cover the cost. Not for a pipelined move: it is already queued behind + // the last pickup's Return, and a jump there would only disturb that queue. The tap jump + // has a fixed height, so LootJumpHeight no longer has an effect. + if (!pipelined && ShouldJumpLoot(settings)) + Host.TapJump(); // Always a move into a pack, never a use: a use on a wearable corpse item is // get-and-wield, which put salvage jewellery on the character (2026-10-02). @@ -2105,6 +2105,14 @@ public sealed partial class RynthAiPlugin /// A gap between two held calls longer than this was not one continuous hold (the corpse clock is not paid back for it). internal const long PickupHoldMaxGapMs = 500; + /// Jump-loot for this pickup: the setting, the keyboard jump and the move call, stamina for + /// the jump. + private bool ShouldJumpLoot(LegacyUiSettings settings) => + settings.LootJumpEnabled + && Host.HasTapJump + && Host.HasMoveItemExternal + && _vitals.CurrentStamina > 5; + /// /// True while the server owes an answer to a cast or use (ActionPacer): ACE refuses a pickup /// then (Player.HandleActionPutItemInContainer_Verify: IsBusy -> YoureTooBusy and diff --git a/Plugins/RynthCore.Plugin.RynthAi/LegacyUi/LegacyAdvancedSettingsUi.cs b/Plugins/RynthCore.Plugin.RynthAi/LegacyUi/LegacyAdvancedSettingsUi.cs index eaf1281..f7e473b 100644 --- a/Plugins/RynthCore.Plugin.RynthAi/LegacyUi/LegacyAdvancedSettingsUi.cs +++ b/Plugins/RynthCore.Plugin.RynthAi/LegacyUi/LegacyAdvancedSettingsUi.cs @@ -1050,11 +1050,8 @@ internal sealed class LegacyAdvancedSettingsUi if (ImGui.IsItemHovered()) ImGui.SetTooltip("Loots scrolls of spells you don't know and can learn (magic school trained or\nspecialized, skill high enough), and reads them when it's safe. Scrolls already\nin your pack are read too."); ImGui.Checkbox("Jump When Looting", ref _settings.LootJumpEnabled); - if (_settings.LootJumpEnabled) - { - ImGui.SetNextItemWidth(120); - ImGui.SliderInt("Jump Height", ref _settings.LootJumpHeight, 1, 100); - } + if (ImGui.IsItemHovered()) + ImGui.SetTooltip("Hop (the keyboard jump) just before each pickup,\nso the server skips the bend-down. The hop has a fixed height."); ImGui.Spacing(); ImGui.Text("Corpse Ownership"); diff --git a/Plugins/RynthCore.Plugin.RynthAi/LegacyUi/LegacyUiSettings.cs b/Plugins/RynthCore.Plugin.RynthAi/LegacyUi/LegacyUiSettings.cs index 5d7dc1f..118a53a 100644 --- a/Plugins/RynthCore.Plugin.RynthAi/LegacyUi/LegacyUiSettings.cs +++ b/Plugins/RynthCore.Plugin.RynthAi/LegacyUi/LegacyUiSettings.cs @@ -136,7 +136,7 @@ public sealed class LegacyUiSettings public int LootOpenRetryMs = LootBaseline.OpenRetryMs; public int LootCorpseTimeoutMs = LootBaseline.CorpseTimeoutMs; public bool LootJumpEnabled = false; - public int LootJumpHeight = 10; // 0–100; maps to 0.0–1.0 JumpNonAutonomous extent + public int LootJumpHeight = 10; // kept for old profiles and metas; jump-loot uses the keyboard tap jump (fixed height) public int SalvageOpenDelayFirstMs = 400; public int SalvageOpenDelayFastMs = 50;