make spawn glow follow the player's currently selected spawn tile

Plumb spawnTile through PlayerUpdate / PlayerState / applyStateUpdate
so the WebGL spawn overlay can read it directly. The glow was reading
nameData.x/y (territory centroid for label placement) which only
recomputes every 2 ticks and only when largestClusterBoundingBox has
been updated by PlayerExecution — both lag the player's actual spawn
click. Using spawnTile updates the same tick setSpawnTile() fires.

Also adds spawnTile to diffPlayerUpdate / applyStateUpdate so changes
after the initial full snapshot actually propagate (the recent
diff-only PlayerUpdate path silently dropped any field not enumerated
in those helpers).
This commit is contained in:
evanpelle
2026-05-18 19:15:01 -07:00
parent 0eb8578996
commit 17e3ac4b05
6 changed files with 14 additions and 3 deletions
+2
View File
@@ -61,6 +61,8 @@ export interface PlayerState {
traitorRemainingTicks: number;
betrayals: number;
hasSpawned: boolean;
/** TileRef the player picked as their spawn (undefined if not yet spawned). */
spawnTile?: number;
lastDeleteUnitTick: number;
allies: number[];
embargoes: number[];