fix: napalm destruction of terrain glitches sometimes
This commit is contained in:
1 parent
84548ba74d
commit
86c06010d4
1 file changed
+1
-1
+1
-1
@@ -965,7 +965,7 @@ function updateNapalm(dt) {
|
|||||||
const deadFireCells = fireCells.filter(f => f.timeLeft <= 0);
|
const deadFireCells = fireCells.filter(f => f.timeLeft <= 0);
|
||||||
fireCells = fireCells.filter(f => f.timeLeft > 0);
|
fireCells = fireCells.filter(f => f.timeLeft > 0);
|
||||||
for (let f of deadFireCells) {
|
for (let f of deadFireCells) {
|
||||||
clipTerrain(terrain, (ctx) => { ctx.fillStyle = '#000'; ctx.fillRect(f.x, f.y + 1, 1, 1); });
|
clipTerrain(terrain, (ctx) => ctx.clearRect(f.x, f.y + 1, 1, 1));
|
||||||
for (let dx = -2; dx <= 2; dx++) {
|
for (let dx = -2; dx <= 2; dx++) {
|
||||||
for (let dy = 0; dy <= 2; dy++) {
|
for (let dy = 0; dy <= 2; dy++) {
|
||||||
if (dx === 0 && dy === 0) continue;
|
if (dx === 0 && dy === 0) continue;
|
||||||
|
|||||||
Reference in new issue
Block a user