diff --git a/core/src/mindustry/client/Client.kt b/core/src/mindustry/client/Client.kt index dfa023d297..08d3605561 100644 --- a/core/src/mindustry/client/Client.kt +++ b/core/src/mindustry/client/Client.kt @@ -141,7 +141,7 @@ object Client { if (showingTurrets || showingInvTurrets) { val enemyunits = Core.settings.getBool("enemyunitranges") val showall = Core.settings.getBool("showallturrets") - val flying = player.unit() == null || player.unit().isFlying + val flying = player.unit()?.isFlying val mousev = Core.input.mouseWorld() val mouseBuild = world.buildWorld(mousev.x, mousev.y) getTree().use { diff --git a/core/src/mindustry/world/blocks/storage/Unloader.java b/core/src/mindustry/world/blocks/storage/Unloader.java index b5f6b148da..a65d2034fd 100644 --- a/core/src/mindustry/world/blocks/storage/Unloader.java +++ b/core/src/mindustry/world/blocks/storage/Unloader.java @@ -238,7 +238,7 @@ public void draw(){ Draw.color(sortItem == null ? customNullLoader ? Pal.lightishGray : Color.clear : sortItem.color); Draw.rect(centerRegion, x, y); - if(drawUnloaderItems && possibleBlocks.size >= 2 && lastItem != null && dumpingFrom != null && dumpingTo != null && enabled){ + if(drawUnloaderItems && possibleBlocks.size >= 2 && lastItem != null && dumpingFrom != null && dumpingTo != null && dumpingFrom.building != null && dumpingTo.building != null && enabled){ Draw.color(lastItem.color, 0.67f); Draw.rect("unloader-center", x, y); Draw.alpha(1f);