repaint overlapping trails when transport ship dies

This commit is contained in:
Evan
2025-04-05 13:57:18 -07:00
parent 7050a5816d
commit 5fec71481d
+17
View File
@@ -553,6 +553,23 @@ export class UnitLayer implements Layer {
);
}
this.boatToTrail.delete(unit);
// Repaint overlapping trails
const trailSet = new Set(trail);
for (const [other, trail] of this.boatToTrail) {
for (const t of trail) {
if (trailSet.has(t)) {
this.paintCell(
this.game.x(t),
this.game.y(t),
rel,
this.theme.territoryColor(other.owner()),
150,
this.transportShipTrailContext,
);
}
}
}
}
}