mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-15 17:36:59 +00:00
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:
@@ -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[];
|
||||
|
||||
Reference in New Issue
Block a user