mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-03 04:44:24 +07:00
Fixed multithreading
This commit is contained in:
parent
5c120e532f
commit
a04e432aea
@ -105,7 +105,9 @@ public class ThreadHandler {
|
||||
toRun.clear();
|
||||
}
|
||||
|
||||
logic.doUpdate = true;
|
||||
logic.update();
|
||||
logic.doUpdate = false;
|
||||
|
||||
long elapsed = TimeUtils.timeSinceMillis(time);
|
||||
long target = (long) (1000 / 60f);
|
||||
|
@ -5,11 +5,8 @@ import com.badlogic.gdx.utils.ObjectMap;
|
||||
import com.badlogic.gdx.utils.ObjectSet;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
|
||||
/**Wrapper around an ObjectMap for team data.*/
|
||||
/**Class for various team-based utilities.*/
|
||||
public class TeamInfo {
|
||||
private final static ObjectSet<Team> empty = new ObjectSet<>();
|
||||
private final static ObjectSet<TeamData> emptyData = new ObjectSet<>();
|
||||
|
||||
private ObjectMap<Team, TeamData> map = new ObjectMap<>();
|
||||
private ObjectSet<Team> allies = new ObjectSet<>(),
|
||||
enemies = new ObjectSet<>();
|
||||
|
@ -10,7 +10,6 @@ import io.anuke.ucore.scene.Group;
|
||||
import io.anuke.ucore.scene.builders.imagebutton;
|
||||
import io.anuke.ucore.scene.builders.label;
|
||||
import io.anuke.ucore.scene.builders.table;
|
||||
import io.anuke.ucore.util.OS;
|
||||
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
|
||||
@ -40,13 +39,7 @@ public class MenuFragment implements Fragment{
|
||||
|
||||
add(new MenuButton("icon-info", "$text.about.button", ui.about::show));
|
||||
|
||||
add(new MenuButton("icon-menu", OS.isMac ? "$text.credits" : "$text.changelog.title", () -> {
|
||||
if(OS.isMac){
|
||||
ui.about.showCredits();
|
||||
}else {
|
||||
ui.changelog.show();
|
||||
}
|
||||
}));
|
||||
add(new MenuButton("icon-tools", "$text.settings", ui.settings::show));
|
||||
|
||||
row();
|
||||
|
||||
|
@ -33,6 +33,7 @@ public class DesktopLauncher {
|
||||
config.setWindowedMode(960, 540);
|
||||
config.setWindowIcon("sprites/icon.png");
|
||||
|
||||
if(OS.isMac) {
|
||||
Application.getApplication().setOpenFileHandler(e -> {
|
||||
List<File> list = e.getFiles();
|
||||
|
||||
@ -68,7 +69,6 @@ public class DesktopLauncher {
|
||||
});
|
||||
});
|
||||
|
||||
if(OS.isMac) {
|
||||
config.setPreferencesConfig(OS.getAppDataDirectoryString("Mindustry"), FileType.Absolute);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user