Agent.Update writes Turn every tick, so a state that does not pilot holds the hull
Turn is a rate. Combat wrote it each tick and nothing wrote it after the Minion returned to its root state, so the hull kept the last rate and spun without end. The pilot tick now writes zero before the state runs; a piloting state overwrites it with its demand. One writer per tick, no reset in Ship. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
5681e64c52
commit
636ffc92bd
1 changed files with 3 additions and 0 deletions
|
|
@ -46,6 +46,9 @@ public class Agent
|
|||
|
||||
public void Update(float delta)
|
||||
{
|
||||
// The pilot tick writes Turn every tick, in every state: a state that pilots overwrites this zero with its
|
||||
// demand, and one that does not leaves the hull holding course instead of inheriting the last state's rate.
|
||||
Ship.Turn = 0;
|
||||
_currentState.Update(delta);
|
||||
foreach (var transition in _currentState.Transitions)
|
||||
if (transition.Condition())
|
||||
|
|
|
|||
Loading…
Reference in a new issue