From 8fa6b76bf9bb1b39e702d63ec1998c48af71bb95 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 12 Dec 2020 11:14:17 -0500 Subject: [PATCH] Fixed #3936 --- core/src/mindustry/core/Renderer.java | 2 +- core/src/mindustry/entities/comp/UnitComp.java | 2 ++ gradle.properties | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/mindustry/core/Renderer.java b/core/src/mindustry/core/Renderer.java index bdc9b77601..7d6ed8c373 100644 --- a/core/src/mindustry/core/Renderer.java +++ b/core/src/mindustry/core/Renderer.java @@ -66,7 +66,7 @@ public class Renderer implements ApplicationListener{ float dest = Mathf.round(targetscale, 0.5f); camerascale = Mathf.lerpDelta(camerascale, dest, 0.1f); - if(Mathf.within(camerascale, dest, 0.001f)) camerascale = dest; + if(Mathf.equal(camerascale, dest, 0.001f)) camerascale = dest; laserOpacity = Core.settings.getInt("lasersopacity") / 100f; if(landTime > 0){ diff --git a/core/src/mindustry/entities/comp/UnitComp.java b/core/src/mindustry/entities/comp/UnitComp.java index fb4e23e6e5..376682cc37 100644 --- a/core/src/mindustry/entities/comp/UnitComp.java +++ b/core/src/mindustry/entities/comp/UnitComp.java @@ -402,6 +402,8 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I /** Actually destroys the unit, removing it and creating explosions. **/ public void destroy(){ + if(!isAdded()) return; + float explosiveness = 2f + item().explosiveness * stack().amount * 1.53f; float flammability = item().flammability * stack().amount / 1.9f; diff --git a/gradle.properties b/gradle.properties index 858d44b46f..67c6eec1be 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ org.gradle.daemon=true org.gradle.jvmargs=-Xms256m -Xmx1024m -archash=9cb277618ace40f91c93987ad922c16922c1a8d6 +archash=5d45de2d63d75e9a51a0f38d1cbc572020c2b273