LockOn: the hostile is ordered to close on the player; the warning is measured against the poses it was stamped from
ScenarioStage.Approach(entity, target) states a piloted entity's task as a follow task on the target, passed through Zone.Admit to the flight as the member's baseline task; it replaces Patrol(entity, orbit) and the orbit index, and RunStart's post-admit circuit overwrite. LockOn stages at .6, the quality Crossing and the other RunStart scenarios use (its brief states none), not .8 picked by outcome. The bearing check keeps well-law r4's intent (measure against the hostile's actual pose, not the staged line) but reads the poses of the tick before the paint was first seen, which is the tick it was stamped in, with a .05 deg limit for float error; the live-pose check at .5 deg spent its budget on the paint inbox's deliberate one-tick delay. LockOnHoldsUnderOnePercentOfEachStagedInput moves hostile x, y and quality by 1% each way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
eb752a49c9
commit
14d3327c19
6 changed files with 100 additions and 49 deletions
|
|
@ -25,7 +25,7 @@ public class Flight
|
|||
private class Member
|
||||
{
|
||||
public Agent Agent;
|
||||
public PatrolOrbitsTask Patrol;
|
||||
public AgentTask Baseline;
|
||||
}
|
||||
|
||||
private readonly FactionDoctrine _doctrine;
|
||||
|
|
@ -49,10 +49,11 @@ public class Flight
|
|||
|
||||
public Phase PhaseOf(Entity track) => _tracks.TryGetValue(track, out var t) ? t.Phase : Phase.None;
|
||||
|
||||
public void Join(Agent agent, PatrolOrbitsTask circuit)
|
||||
// The task a member holds when the flight has nothing to follow: its patrol circuit, or the task a scenario stated.
|
||||
public void Join(Agent agent, AgentTask baseline)
|
||||
{
|
||||
_members.Add(new Member { Agent = agent, Patrol = circuit });
|
||||
agent.Task = circuit;
|
||||
_members.Add(new Member { Agent = agent, Baseline = baseline });
|
||||
agent.Task = baseline;
|
||||
}
|
||||
|
||||
public void Leave(Agent agent) => _members.RemoveAll(m => m.Agent == agent);
|
||||
|
|
@ -167,8 +168,8 @@ public class Flight
|
|||
if (!(member.Agent.Task is FollowTask current) || current.Anchor != anchor)
|
||||
member.Agent.Task = new FollowTask { Anchor = anchor, Standoff = Standoff(ship) };
|
||||
}
|
||||
else if (member.Agent.Task != member.Patrol)
|
||||
member.Agent.Task = member.Patrol;
|
||||
else if (member.Agent.Task != member.Baseline)
|
||||
member.Agent.Task = member.Baseline;
|
||||
}
|
||||
|
||||
private static void Aim(Ship ship, Entity target)
|
||||
|
|
|
|||
Loading…
Reference in a new issue