Client: keep the current target when it leaves the area of interest (UO last-target) #68

Open
opened 2026-07-19 07:57:50 +02:00 by marco · 0 comments
Owner

The client clears the current target (_attackTarget) as soon as the targeted creature leaves the player's area of interest (a MobileRemoved arrives → it drops out of _mobiles → the target is nulled). So walking away from a target loses it, which is annoying.

UO keeps a "last target" that persists even out of view (you can re-attack/re-cast at it when it's back).

Fix (client, later)

  • Keep _attackTarget even when the creature leaves view; don't null it on MobileRemoved.
  • Auto-attack/cast only fire when the target is actually present + in range (the server already validates), so an out-of-view target just goes idle until it returns.
  • Clear it explicitly (Esc, or clicking elsewhere / a new target), or when the target truly dies (MobileRemoved due to death vs due to AoI — may need to distinguish, or just keep it and let the server reject).
The client clears the current target (`_attackTarget`) as soon as the targeted creature leaves the player's **area of interest** (a `MobileRemoved` arrives → it drops out of `_mobiles` → the target is nulled). So walking away from a target loses it, which is annoying. UO keeps a **"last target"** that persists even out of view (you can re-attack/re-cast at it when it's back). ## Fix (client, later) - Keep `_attackTarget` even when the creature leaves view; don't null it on `MobileRemoved`. - Auto-attack/cast only fire when the target is actually present + in range (the server already validates), so an out-of-view target just goes idle until it returns. - Clear it explicitly (Esc, or clicking elsewhere / a new target), or when the target truly dies (`MobileRemoved` due to death vs due to AoI — may need to distinguish, or just keep it and let the server reject).
marco added this to the Alpha milestone 2026-07-20 18:37:59 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
marco/IsoMmo#68
No description provided.