diff --git a/src/client/WebGLFrameBuilder.ts b/src/client/WebGLFrameBuilder.ts index 6a293f15a..17b76b9b0 100644 --- a/src/client/WebGLFrameBuilder.ts +++ b/src/client/WebGLFrameBuilder.ts @@ -150,18 +150,20 @@ export class WebGLFrameBuilder { const spawnTile = p.state.spawnTile; if (spawnTile === undefined) continue; const isSelf = me !== null && p.smallID() === me.smallID(); - // myPlayer's ring color is overridden in SpawnOverlayPass (animated - // white→gold pulse); everyone else uses their territory tint. + // myPlayer's ring pulses white→this color in SpawnOverlayPass: gold + // when teamless, own territory tint in team games (matches teammates' + // rings). Everyone else uses their territory tint directly. const c = p.territoryColor().toRgb(); + const useGold = isSelf && myTeam === null; centers.push({ // spawnTile tracks the player's currently-selected spawn directly — // updates the same tick the player picks a new location (faster than // the nameData centroid which only refreshes every 2 ticks). x: gameView.x(spawnTile), y: gameView.y(spawnTile), - r: c.r / 255, - g: c.g / 255, - b: c.b / 255, + r: useGold ? 1 : c.r / 255, + g: useGold ? 0.84 : c.g / 255, + b: useGold ? 0 : c.b / 255, isSelf, isTeammate: myTeam !== null && diff --git a/src/client/render/gl/passes/SpawnOverlayPass.ts b/src/client/render/gl/passes/SpawnOverlayPass.ts index 50b995c48..c17d012b5 100644 --- a/src/client/render/gl/passes/SpawnOverlayPass.ts +++ b/src/client/render/gl/passes/SpawnOverlayPass.ts @@ -151,11 +151,12 @@ export class SpawnOverlayPass { dataA[i * 4 + 0] = c.x; dataA[i * 4 + 1] = c.y; if (c.isSelf) { - // Self ring pulses white (1,1,1) → gold (1,0.84,0) in phase with the - // breath so one end of the pulse always contrasts with the terrain. - dataA[i * 4 + 2] = 1; - dataA[i * 4 + 3] = 1 - 0.16 * breathRadius; - dataB[i * 4 + 0] = 1 - breathRadius; + // Self ring pulses white (1,1,1) → its center color (gold when + // teamless, team color in team games) in phase with the breath so + // one end of the pulse always contrasts with the terrain. + dataA[i * 4 + 2] = 1 - (1 - c.r) * breathRadius; + dataA[i * 4 + 3] = 1 - (1 - c.g) * breathRadius; + dataB[i * 4 + 0] = 1 - (1 - c.b) * breathRadius; } else { dataA[i * 4 + 2] = c.r; dataA[i * 4 + 3] = c.g;