Skip to content

Commit

Permalink
Bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Anuken committed Sep 28, 2019
1 parent 4e55cbb commit a74722a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/src/io/anuke/mindustry/core/NetServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ void vote(Player player, int d){
}

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));
Expand Down
4 changes: 4 additions & 0 deletions core/src/io/anuke/mindustry/entities/type/FlyingUnit.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ public void update(){

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){
Expand Down
5 changes: 3 additions & 2 deletions ios/src/io/anuke/mindustry/IOSLauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
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.*;
Expand Down Expand Up @@ -59,7 +58,9 @@ public void didPickDocumentsAtURLs(UIDocumentBrowserViewController controller, N
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
Expand Down

0 comments on commit a74722a

Please sign in to comment.