fix(combat): persist death and retarget on kill
Keep the velocity-only NPC adaptation inside the locomotion family so authoritative Dead motion remains persistent. Route selection clears through a dedicated combat target controller that reacquires the closest eligible creature when retail Auto Target conditions apply. Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
parent
5276a83087
commit
9b97102c67
10 changed files with 281 additions and 19 deletions
|
|
@ -61,6 +61,21 @@ public static class ServerControlledLocomotion
|
|||
true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Limits the AP-80 position-velocity adaptation to the locomotion state
|
||||
/// family it exists to supply. Retail UpdatePosition never selects a
|
||||
/// motion at all; therefore an authoritative action/substate such as Dead
|
||||
/// must never be replaced by this adaptation.
|
||||
/// </summary>
|
||||
public static bool CanApplyVelocityCycle(uint currentMotion)
|
||||
=> currentMotion == MotionCommand.Ready || IsLocomotion(currentMotion);
|
||||
|
||||
public static bool IsLocomotion(uint motion)
|
||||
{
|
||||
uint low = motion & 0xFFu;
|
||||
return low is 0x05 or 0x06 or 0x07 or 0x0F or 0x10;
|
||||
}
|
||||
|
||||
public readonly record struct LocomotionCycle(
|
||||
uint Motion,
|
||||
float SpeedMod,
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ public enum SelectionChangeReason
|
|||
Selected,
|
||||
Cleared,
|
||||
SelectedObjectRemoved,
|
||||
CombatTargetDied,
|
||||
PreviousSelection,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue