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