From 6d1b8b81fa60d628035953095583ef1c832b1e04 Mon Sep 17 00:00:00 2001 From: Anuken Date: Mon, 10 Jun 2019 10:11:28 -0400 Subject: [PATCH] Bugfixes --- core/src/io/anuke/mindustry/content/UnitTypes.java | 8 ++++---- core/src/io/anuke/mindustry/core/NetClient.java | 2 +- core/src/io/anuke/mindustry/entities/type/Player.java | 2 +- core/src/io/anuke/mindustry/ui/dialogs/JoinDialog.java | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/src/io/anuke/mindustry/content/UnitTypes.java b/core/src/io/anuke/mindustry/content/UnitTypes.java index fe7e4ed7f6..c96509e21c 100644 --- a/core/src/io/anuke/mindustry/content/UnitTypes.java +++ b/core/src/io/anuke/mindustry/content/UnitTypes.java @@ -17,8 +17,8 @@ public class UnitTypes implements ContentList{ spirit = new UnitType("spirit", Spirit.class, Spirit::new){{ isFlying = true; drag = 0.01f; - speed = 0.2f; - maxVelocity = 0.8f; + speed = 0.4f; + maxVelocity = 1.6f; range = 50f; health = 60; engineSize = 1.8f; @@ -217,8 +217,8 @@ public class UnitTypes implements ContentList{ isFlying = true; drag = 0.01f; mass = 2f; - speed = 0.2f; - maxVelocity = 0.9f; + speed = 0.45f; + maxVelocity = 1.9f; range = 70f; itemCapacity = 70; health = 220; diff --git a/core/src/io/anuke/mindustry/core/NetClient.java b/core/src/io/anuke/mindustry/core/NetClient.java index e5395628cc..658afabd2c 100644 --- a/core/src/io/anuke/mindustry/core/NetClient.java +++ b/core/src/io/anuke/mindustry/core/NetClient.java @@ -229,7 +229,7 @@ public class NetClient implements ApplicationListener{ int id = input.readInt(); byte typeID = input.readByte(); - SyncTrait entity = (SyncTrait)group.getByID(id); + SyncTrait entity = group == null ? null : (SyncTrait)group.getByID(id); boolean add = false; if(entity == null && id == player.id){ diff --git a/core/src/io/anuke/mindustry/entities/type/Player.java b/core/src/io/anuke/mindustry/entities/type/Player.java index 41f98ef021..ad6b53f70c 100644 --- a/core/src/io/anuke/mindustry/entities/type/Player.java +++ b/core/src/io/anuke/mindustry/entities/type/Player.java @@ -429,7 +429,7 @@ public class Player extends Unit implements BuilderTrait, ShooterTrait{ public void drawBuildRequests(){ BuildRequest last = null; for(BuildRequest request : getPlaceQueue()){ - if(getCurrentRequest() == request && request.progress > 0.001f) continue; + if(getCurrentRequest() == request && request.progress > 0.001f && (dst(request.x * tilesize, request.y * tilesize) <= placeDistance || state.isEditor())) continue; if(request.breaking){ Block block = world.ltile(request.x, request.y).block(); diff --git a/core/src/io/anuke/mindustry/ui/dialogs/JoinDialog.java b/core/src/io/anuke/mindustry/ui/dialogs/JoinDialog.java index 65c7e22137..cf4555aa66 100644 --- a/core/src/io/anuke/mindustry/ui/dialogs/JoinDialog.java +++ b/core/src/io/anuke/mindustry/ui/dialogs/JoinDialog.java @@ -171,7 +171,7 @@ public class JoinDialog extends FloatingDialog{ t.add("[lightgray]" + (host.players != 1 ? Core.bundle.format("players", host.players) : Core.bundle.format("players.single", host.players))).left(); t.row(); - t.add("[lightgray]" + Core.bundle.format("save.map", host.mapname) + " / " + Core.bundle.format("save.wave", host.wave)).width(targetWidth() - 10f).left().get().setEllipsis(true); + t.add("[lightgray]" + Core.bundle.format("save.map", host.mapname) + "[] / " + Core.bundle.format("save.wave", host.wave)).width(targetWidth() - 10f).left().get().setEllipsis(true); }).expand().left().bottom().padLeft(12f).padBottom(8); }, e -> {