diff --git a/orfy8cilgg.js b/orfy8cilgg.js index 96fac97..c5f58e8 100644 --- a/orfy8cilgg.js +++ b/orfy8cilgg.js @@ -797,6 +797,7 @@ if (this.mouseIsDown) */ if (GameLib.Utils.UndefinedOrNull(mesh.burnLife)) { mesh.burnLife = 1; + mesh.burning = false; } if (!mesh.burning) { @@ -804,19 +805,18 @@ if (this.mouseIsDown) mesh.burnLife -= data.delta * 2; if (mesh.burnLife <= 0) { - + mesh.burnLife = 0; this.burnTree(mesh); + } - if (mesh.instance.material.emissive) { - mesh.instance.material.emissive.setRGB( - 1 - mesh.burnLife, - 0, - 0 - ); - } + if (mesh.instance.material.emissive) { + mesh.instance.material.emissive.setRGB( + 1 - mesh.burnLife, + 0, + 0 + ); } } - } } }.bind(this)