fix(B.6+B.7): run-all-the-way auto-walk, per-type indicator height, R = smart interact
Three user-reported fixes:
1. (B.6) Run-vs-walk decision lifted out of the per-frame overlay
into BeginServerAutoWalk. Once set at auto-walk start, the
character runs (or walks) the full way to the target instead of
transitioning. Matches user-observed retail behaviour:
'if its far away it should run all the way to the object and
then stop'.
_autoWalkWalkRunThreshold → _autoWalkInitiallyRunning (bool,
sampled once from initial distance vs the wire's WalkRunThreshold).
2. (B.7) TargetIndicatorPanel now picks EntityHeight per-type:
Creature (NPC/player) → 1.8 m
Door / Lifestone / Portal (tall structures) → 2.4 m
Default (small ground item) → 0.5 m
Items now get a small box hugging the silhouette instead of a
humanoid-tall rectangle floating around them.
3. (Interact) R-key (UseCurrentSelection) now dispatches by target
type:
Item (no Creature flag, no BF_DOOR|LIFESTONE|PORTAL|CORPSE)
→ SendPickUp (PutItemInContainer 0x0019)
Everything else → SendUse (0x0036)
Single hotkey to interact with whatever's selected.
Deferred (separate phase): turn-to-face on close-range use. ACE
server-side does Rotate(target) before the close-range pickup
callback (Player_Move.cs:71), but our local body doesn't echo
the turn yet — needs a synthesized client-side rotation or
MovementType=8 TurnToObject handling. Filing as follow-up.
This commit is contained in:
parent
1a0656a3ce
commit
211fe240b8
3 changed files with 82 additions and 24 deletions
|
|
@ -9064,10 +9064,36 @@ public sealed class GameWindow : IDisposable
|
|||
|
||||
private void UseCurrentSelection()
|
||||
{
|
||||
if (_selectedGuid is uint sel)
|
||||
SendUse(sel);
|
||||
else
|
||||
if (_selectedGuid is not uint sel)
|
||||
{
|
||||
_debugVm?.AddToast("Nothing selected");
|
||||
return;
|
||||
}
|
||||
|
||||
// B.7 (2026-05-15): the user requested R behave as a universal
|
||||
// interact key — pickup for items, use for NPCs / doors /
|
||||
// lifestones / portals / corpses. Matches retail's "use"
|
||||
// behaviour where the action picked depends on the target's
|
||||
// type rather than forcing the player to remember a different
|
||||
// hotkey per target type.
|
||||
bool isPickupableItem = true;
|
||||
if (_liveEntityInfoByGuid.TryGetValue(sel, out var info)
|
||||
&& (info.ItemType & AcDream.Core.Items.ItemType.Creature) != 0)
|
||||
{
|
||||
// NPCs / monsters / players are Use targets, never PickUp.
|
||||
isPickupableItem = false;
|
||||
}
|
||||
if (_lastSpawnByGuid.TryGetValue(sel, out var spawn)
|
||||
&& spawn.ObjectDescriptionFlags is { } odf)
|
||||
{
|
||||
// BF_DOOR | BF_LIFESTONE | BF_PORTAL | BF_CORPSE → Use, not PickUp.
|
||||
// (acclient.h:6431-6463)
|
||||
const uint NonPickupMask = 0x1000u | 0x4000u | 0x40000u | 0x2000u;
|
||||
if ((odf & NonPickupMask) != 0) isPickupableItem = false;
|
||||
}
|
||||
|
||||
if (isPickupableItem) SendPickUp(sel);
|
||||
else SendUse(sel);
|
||||
}
|
||||
|
||||
private void SendUse(uint guid)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue