bufix: paint unit sprites correctly on alternate view

This commit is contained in:
Evan
2025-04-15 20:46:59 -07:00
parent 5167f67b96
commit 8658fd0ff9
2 changed files with 25 additions and 2 deletions
+2 -1
View File
@@ -76,10 +76,11 @@ export const getColoredSprite = (
unit: UnitView,
theme: Theme,
customTerritoryColor?: Colord,
customBorderColor?: Colord,
): HTMLCanvasElement => {
const owner = unit.owner();
const territoryColor = customTerritoryColor ?? theme.territoryColor(owner);
const borderColor = theme.borderColor(owner);
const borderColor = customBorderColor ?? theme.borderColor(owner);
const spawnHighlightColor = theme.spawnHighlightColor();
const colorKey = customTerritoryColor
? customTerritoryColor.toRgbString()