fix: napalm destruction of terrain glitches sometimes

This commit is contained in:
catarrh committed 2026-07-27 01:33:13 +03:00
1 parent 65c2e503fe
commit 84548ba74d
1 file changed
+1 -1
+1 -1
View File
@@ -965,7 +965,7 @@ function updateNapalm(dt) {
const deadFireCells = fireCells.filter(f => f.timeLeft <= 0);
fireCells = fireCells.filter(f => f.timeLeft > 0);
for (let f of deadFireCells) {
clipTerrain(terrain, (ctx) => drawRect(ctx, f.x, f.y + 1, 1, 1, ctx.color));
clipTerrain(terrain, (ctx) => { ctx.fillStyle = '#000'; ctx.fillRect(f.x, f.y + 1, 1, 1); });
for (let dx = -2; dx <= 2; dx++) {
for (let dy = 0; dy <= 2; dy++) {
if (dx === 0 && dy === 0) continue;