From 96ab7e7f11f443a0c19b4c96595dc6bc5640dbb6 Mon Sep 17 00:00:00 2001 From: Evan Date: Wed, 22 Jan 2025 20:29:03 -0800 Subject: [PATCH] bugfix: don't render inactive structures --- src/client/graphics/layers/StructureLayer.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/client/graphics/layers/StructureLayer.ts b/src/client/graphics/layers/StructureLayer.ts index 5b807c8fd..e836d1f61 100644 --- a/src/client/graphics/layers/StructureLayer.ts +++ b/src/client/graphics/layers/StructureLayer.ts @@ -124,6 +124,10 @@ export class StructureLayer implements Layer { this.clearCell(new Cell(this.game.x(tile), this.game.y(tile))); } + if (!unit.isActive()) { + return + } + // Draw border and territory for (const tile of this.game.bfs(unit.tile(), euclDistFN(unit.tile(), config.borderRadius))) { this.paintCell(