fix shellexecution deleting already inactive unit

This commit is contained in:
Evan
2024-12-10 20:28:39 -08:00
parent d5f6a9c1e4
commit 1a9170d10b
3 changed files with 7 additions and 5 deletions
-4
View File
@@ -95,16 +95,12 @@ export class NameLayer implements Layer {
render.lastBoundingCalculated = now
if (shouldRecalc) {
render.boundingBox = calculateBoundingBox(render.player.borderTiles());
} else {
console.log('skipping box calculation')
}
}
if (render.isVisible && now - render.lastRenderCalc > this.refreshRate) {
render.lastRenderCalc = Date.now() + this.rand.nextInt(0, 100)
if (shouldRecalc) {
this.calculateRenderInfo(render)
} else {
console.log('skipping name render')
}
}
}