diff --git a/core/src/io/anuke/mindustry/core/NetServer.java b/core/src/io/anuke/mindustry/core/NetServer.java index cc65655b88..1f4a0c90ff 100644 --- a/core/src/io/anuke/mindustry/core/NetServer.java +++ b/core/src/io/anuke/mindustry/core/NetServer.java @@ -262,7 +262,7 @@ public class NetServer implements ApplicationListener{ } boolean checkPass(){ - if(votes >= votesRequired() && target.isAdded() && target.con.isConnected()){ + if(votes >= votesRequired()){ Call.sendMessage(Strings.format("[orange]Vote passed.[scarlet] {0}[orange] will be banned from the server for {1} minutes.", target.name, (kickDuration/60))); target.getInfo().lastKicked = Time.millis() + kickDuration*1000; playerGroup.all().each(p -> p.uuid != null && p.uuid.equals(target.uuid), p -> p.con.kick(KickReason.vote)); diff --git a/core/src/io/anuke/mindustry/entities/type/FlyingUnit.java b/core/src/io/anuke/mindustry/entities/type/FlyingUnit.java index 4b67274cb4..5c8963cd49 100644 --- a/core/src/io/anuke/mindustry/entities/type/FlyingUnit.java +++ b/core/src/io/anuke/mindustry/entities/type/FlyingUnit.java @@ -36,6 +36,10 @@ public abstract class FlyingUnit extends BaseUnit{ if(target == null) targetClosestEnemyFlag(BlockFlag.producer); if(target == null) targetClosestEnemyFlag(BlockFlag.turret); + + if(target == null && isCommanded() && getCommand() != UnitCommand.attack){ + onCommand(getCommand()); + } } if(getClosestSpawner() == null && getSpawner() != null && target == null){ diff --git a/ios/src/io/anuke/mindustry/IOSLauncher.java b/ios/src/io/anuke/mindustry/IOSLauncher.java index 6867ff01f7..45c932fa1d 100644 --- a/ios/src/io/anuke/mindustry/IOSLauncher.java +++ b/ios/src/io/anuke/mindustry/IOSLauncher.java @@ -13,7 +13,6 @@ import io.anuke.mindustry.io.*; import io.anuke.mindustry.ui.*; import org.robovm.apple.foundation.*; import org.robovm.apple.uikit.*; -import org.robovm.apple.uikit.UIBarButtonItem.*; import org.robovm.objc.block.*; import java.io.*; @@ -59,7 +58,9 @@ public class IOSLauncher extends IOSApplication.Delegate{ if(documentURLs.size() < 1) return; cont.dismissViewController(true, () -> {}); - cons.accept(Core.files.absolute(documentURLs.get(0).getPath())); + controller.importDocument(documentURLs.get(0), new NSURL(getDocumentsDirectory() + "/document"), UIDocumentBrowserImportMode.Copy, (url, error) -> { + cons.accept(Core.files.absolute(url.getPath())); + }); } @Override