Describe the bug
On maps that define two nations with the same display name, both instances
render with the same flag instead of their own. On the "Indian
Subcontinent" map, indiansubcontinent/info.json defines two separate
nations both named "Punjab" — one flagged India (in), one flagged
Pakistan (pk) — but in an actual game, both territories show the
Pakistan flag, regardless of which one is which.
Root cause: the client resolves a Nation-type bot's flag by looking up its
display name in a Map<string, PlayerCosmetics> built from the map
manifest (GameView.ts). When two manifest entries share a name, the
second one silently overwrites the first in that map, so every bot with
that name ends up with whichever flag was defined last in the manifest
array.
To Reproduce
- Go to openfront.io, click SOLO!
- Select the "Indian Subcontinent" map with enough bots that both
"Punjab" entries are likely to spawn (default nation count, 50+ bots)
- Start the game and watch the map two separate territories get labeled
"Punjab"
- Both show the Pakistan flag, even though one of them is India's Punjab
Expected behavior
Each "Punjab" nation should display its own correct flag such as Indian Punjab
with the Indian flag, Pakistani Punjab with the Pakistani flag.
Screenshots
Desktop (please complete the following information):
- OS: Windows 11
- Browser: Chrome
- Version: 151.0.7922.174 (Official Build) (64-bit) (cohort: Stable)
Smartphone (please complete the following information):
N/A — not device-specific; reproducible in any desktop browser.
Additional context
Checked every map manifest for this pattern: only one other map,
amazonriver, defines two same-named nations ("São João" ×2), but both
share the same flag there so the collision is invisible. Indian
Subcontinent is the only map where it's visibly wrong.
I already have a fix ready and tested (carries each nation's flag through
PlayerInfo -> the per-tick PlayerUpdate instead of re-deriving it
client-side by name, eliminating the lookup collision entirely), with unit
tests covering the regression. Would like to open a PR against this issue.
Assignment
Describe the bug
On maps that define two nations with the same display name, both instances
render with the same flag instead of their own. On the "Indian
Subcontinent" map,
indiansubcontinent/info.jsondefines two separatenations both named "Punjab" — one flagged India (
in), one flaggedPakistan (
pk) — but in an actual game, both territories show thePakistan flag, regardless of which one is which.
Root cause: the client resolves a Nation-type bot's flag by looking up its
display name in a
Map<string, PlayerCosmetics>built from the mapmanifest (
GameView.ts). When two manifest entries share a name, thesecond one silently overwrites the first in that map, so every bot with
that name ends up with whichever flag was defined last in the manifest
array.
To Reproduce
"Punjab" entries are likely to spawn (default nation count, 50+ bots)
"Punjab"
Expected behavior
Each "Punjab" nation should display its own correct flag such as Indian Punjab
with the Indian flag, Pakistani Punjab with the Pakistani flag.
Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information):
N/A — not device-specific; reproducible in any desktop browser.
Additional context
Checked every map manifest for this pattern: only one other map,
amazonriver, defines two same-named nations ("São João" ×2), but bothshare the same flag there so the collision is invisible. Indian
Subcontinent is the only map where it's visibly wrong.
I already have a fix ready and tested (carries each nation's flag through
PlayerInfo-> the per-tickPlayerUpdateinstead of re-deriving itclient-side by name, eliminating the lookup collision entirely), with unit
tests covering the regression. Would like to open a PR against this issue.
Assignment