Fixed crash

This commit is contained in:
Anuken
2018-10-24 18:53:05 -04:00
parent de6681d00a
commit 5be92460c1
2 changed files with 1 additions and 9 deletions

View File

@@ -79,7 +79,7 @@ public abstract class Mission{
public void onComplete(){
if(showComplete && !headless){
ui.hudfrag.showText("[LIGHT_GRAY]"+menuDisplayString() + ":\n" + Bundles.get("text.mission.complete"));
threads.runGraphics(() -> ui.hudfrag.showText("[LIGHT_GRAY]"+menuDisplayString() + ":\n" + Bundles.get("text.mission.complete")));
}
}

View File

@@ -29,10 +29,6 @@ public class NetworkIO{
public static void writeWorld(Player player, OutputStream os){
try(DataOutputStream stream = new DataOutputStream(os)){
stream.writeFloat(Timers.time()); //timer time
stream.writeLong(TimeUtils.millis()); //timestamp
//--GENERAL STATE--
stream.writeByte(state.mode.ordinal()); //gamemode
stream.writeUTF(world.getMap().name); //map name
@@ -156,11 +152,7 @@ public class NetworkIO{
Player player = players[0];
try(DataInputStream stream = new DataInputStream(is)){
float timerTime = stream.readFloat();
long timestamp = stream.readLong();
Timers.clear();
Timers.resetTime(timerTime + (TimeUtils.timeSinceMillis(timestamp) / 1000f) * 60f);
//general state
byte mode = stream.readByte();