mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-02 07:18:07 +00:00
Pulse spawn ring white→team color for self in team games
In team games the local player's spawn breathing ring now pulses white→own team color (matching teammates' rings) instead of white→gold. Gold pulse is unchanged for teamless games (singleplayer/FFA). Self ring stays larger than teammates' via existing self/mate radii.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user