From e26987e563d88bd0ab852040e7da1ab9c6c5784f Mon Sep 17 00:00:00 2001 From: dingo Date: Mon, 13 Apr 2026 17:22:21 -0400 Subject: [PATCH] fix: send full state_update to spectators instead of state_delta Spectators were receiving game.state_delta in the normal delta path, but the client only handles game.state_update for spectator views. Always push a full game.state_update to spectators so they see every turn change without needing to reconnect. Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude Co-Authored-By: Happy --- Server/src/SOR.Game/Handlers/GameHandlerBase.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Server/src/SOR.Game/Handlers/GameHandlerBase.cs b/Server/src/SOR.Game/Handlers/GameHandlerBase.cs index 8f2da0f..a369492 100644 --- a/Server/src/SOR.Game/Handlers/GameHandlerBase.cs +++ b/Server/src/SOR.Game/Handlers/GameHandlerBase.cs @@ -211,10 +211,11 @@ internal abstract class GameHandlerBase var spectators = registry.GetSpectators(session.Id); if (spectators.Count > 0) { - var sd = GameStateDiffer.ComputeSpectatorDelta(prevState, state); + var spectatorDto = GameEngine.ToDtoSpectator(state); foreach (var specId in spectators) tasks.Add(clientPush.PushAsync(specId.ToString(), - ServerMessage.Push("game.state_delta", new GameStateDeltaPush(sd)), ct)); + ServerMessage.Push("game.state_update", + new GameStateUpdatePush(spectatorDto)), ct)); } } }