From 0b407c7c1fc57e0d758cca5e870f2ef4d46fb6c0 Mon Sep 17 00:00:00 2001 From: Anuken Date: Tue, 18 Aug 2020 00:37:09 -0400 Subject: [PATCH] Bugfixes --- core/src/mindustry/content/UnitTypes.java | 2 +- core/src/mindustry/core/Logic.java | 4 +++- core/src/mindustry/core/UI.java | 4 +++- core/src/mindustry/input/MobileInput.java | 2 ++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index 3d0bdaa0cb..5f6cd99541 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -193,7 +193,7 @@ public class UnitTypes implements ContentList{ bullet = new LightningBulletType(){{ lightningColor = hitColor = Pal.heal; - damage = 11f; + damage = 12f; lightningLength = 7; lightningLengthRand = 7; shootEffect = Fx.shootHeal; diff --git a/core/src/mindustry/core/Logic.java b/core/src/mindustry/core/Logic.java index 93e9f90b4c..77741767a9 100644 --- a/core/src/mindustry/core/Logic.java +++ b/core/src/mindustry/core/Logic.java @@ -331,7 +331,9 @@ public class Logic implements ApplicationListener{ } if(!state.isPaused()){ - state.secinfo.update(); + if(state.isCampaign()){ + state.secinfo.update(); + } if(state.isCampaign()){ universe.update(); diff --git a/core/src/mindustry/core/UI.java b/core/src/mindustry/core/UI.java index de85c7ad3b..0d5a08436a 100644 --- a/core/src/mindustry/core/UI.java +++ b/core/src/mindustry/core/UI.java @@ -286,6 +286,7 @@ public class UI implements ApplicationListener, Loadable{ public void showInfoFade(String info){ Table table = new Table(); + table.touchable = Touchable.disabled; table.setFillParent(true); table.actions(Actions.fadeOut(7f, Interp.fade), Actions.remove()); table.top().add(info).style(Styles.outlineLabel).padTop(10); @@ -481,10 +482,11 @@ public class UI implements ApplicationListener, Loadable{ public void announce(String text){ Table t = new Table(); + t.touchable = Touchable.disabled; t.background(Styles.black3).margin(8f) .add(text).style(Styles.outlineLabel); t.update(() -> t.setPosition(Core.graphics.getWidth()/2f, Core.graphics.getHeight()/2f, Align.center)); - t.actions(Actions.fadeOut(3, Interp.pow4In)); + t.actions(Actions.fadeOut(3, Interp.pow4In), Actions.remove()); Core.scene.add(t); } diff --git a/core/src/mindustry/input/MobileInput.java b/core/src/mindustry/input/MobileInput.java index 3d248be1a3..3f6853f4a1 100644 --- a/core/src/mindustry/input/MobileInput.java +++ b/core/src/mindustry/input/MobileInput.java @@ -794,6 +794,8 @@ public class MobileInput extends InputHandler implements GestureListener{ Rect rect = Tmp.r3; UnitType type = unit.type(); + if(type == null) return; + boolean flying = type.flying; boolean omni = !(unit instanceof WaterMovec); boolean legs = unit.isGrounded();