From 1461673168f9a98cf5aa68f492df3362afc9beb6 Mon Sep 17 00:00:00 2001 From: Anuken Date: Tue, 25 Aug 2020 23:14:11 -0400 Subject: [PATCH] Fixed #2425 (probably) --- core/src/mindustry/content/UnitTypes.java | 2 +- core/src/mindustry/entities/comp/UnitComp.java | 4 ++-- core/src/mindustry/input/DesktopInput.java | 2 ++ core/src/mindustry/input/InputHandler.java | 6 +++++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index f7fda72b92..56da2cc7e0 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -389,7 +389,7 @@ public class UnitTypes implements ContentList{ legLength = 30f; legExtension = -15; legBaseOffset = 10f; - landShake = 2f; + landShake = 1f; legSpeed = 0.1f; legLengthScl = 1f; rippleScale = 2f; diff --git a/core/src/mindustry/entities/comp/UnitComp.java b/core/src/mindustry/entities/comp/UnitComp.java index 92d0a08dee..8ab082b8f0 100644 --- a/core/src/mindustry/entities/comp/UnitComp.java +++ b/core/src/mindustry/entities/comp/UnitComp.java @@ -275,10 +275,10 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I damageContinuous(floor.damageTaken); } - if(!net.client() && tile.solid()){ + if(tile.solid()){ if(type.canBoost){ elevation = 1f; - }else{ + }else if(!net.client()){ kill(); } } diff --git a/core/src/mindustry/input/DesktopInput.java b/core/src/mindustry/input/DesktopInput.java index 1285502397..936e4eb58c 100644 --- a/core/src/mindustry/input/DesktopInput.java +++ b/core/src/mindustry/input/DesktopInput.java @@ -566,6 +566,8 @@ public class DesktopInput extends InputHandler{ @Override public void updateState(){ + super.updateState(); + if(state.isMenu()){ droppingItem = false; mode = none; diff --git a/core/src/mindustry/input/InputHandler.java b/core/src/mindustry/input/InputHandler.java index 714c5afb8f..24ae825bfe 100644 --- a/core/src/mindustry/input/InputHandler.java +++ b/core/src/mindustry/input/InputHandler.java @@ -236,6 +236,8 @@ public abstract class InputHandler implements InputProcessor, GestureListener{ player.clearUnit(); player.deathTimer = 61f; + ((CoreBuild)((BlockUnitc)unit).tile()).requestSpawn(player); + }else if(unit == null){ //just clear the unit (is this used?) player.clearUnit(); //make sure it's AI controlled, so players can't overwrite each other @@ -372,7 +374,9 @@ public abstract class InputHandler implements InputProcessor, GestureListener{ } public void updateState(){ - + if(state.isMenu()){ + controlledType = null; + } } public void drawBottom(){