From 636ffc92bd55b678f36b7edf2c0ebbfa251611d7 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 7 Oct 2026 16:23:55 +0200 Subject: [PATCH] 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 --- Assets/Scripts/ServerShared/Agents/Agent.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Assets/Scripts/ServerShared/Agents/Agent.cs b/Assets/Scripts/ServerShared/Agents/Agent.cs index 403aece7d..1d51a855f 100644 --- a/Assets/Scripts/ServerShared/Agents/Agent.cs +++ b/Assets/Scripts/ServerShared/Agents/Agent.cs @@ -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())