A guarding pet's engagement path (FindCombatant) rewrote ControlOrder to
Attack, so guard silently converted to a plain kill order mid-fight (#2595):
the (guarding)/guarded OPL tags vanished, the pet stopped scanning for the
master's threats and never retargeted, recall/gate left it behind
(TeleportPets only takes Guard/Follow/Come), and every engage->kill->resume
cycle replayed the "is now guarding you" flourish. Return pacing also
depended on stale Warmode, leaving guard returns active or passive by combat
history.
- FindCombatant is now FindGuardTarget: a pure selector that prefers the
aggressor closest to the master (RunUO guard parity) and keeps the current
combatant unless a strictly closer one exists. DoOrderGuard engages through
it without ever leaving the Guard order.
- HandleInvalidControlTarget resumes the persistent order first and chains
the next aggressor into an explicit Attack only for non-guard fallbacks —
an explicit "all attack" completes, returns to guarding, and the guard scan
takes over. Resuming Guard no longer replays the sound/message flourish.
- The peaceful guard branch stands down (Warmode/Combatant/FocusMob cleared)
so pacing is deterministic, and guard returns sprint at the follow pace
(0.1s/step, AOS) on the move clock while the think cadence is untouched.
- WalkMobileRange honors the caller's run flag instead of a hardcoded
distance-5 gate; follow/guard run animation now matches their actual pace.
Closes#2595
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>