diff --git a/core/src/io/anuke/mindustry/game/MusicControl.java b/core/src/io/anuke/mindustry/game/MusicControl.java index 066d9f3e79..e3c9a2b2ce 100644 --- a/core/src/io/anuke/mindustry/game/MusicControl.java +++ b/core/src/io/anuke/mindustry/game/MusicControl.java @@ -29,7 +29,6 @@ public class MusicControl{ public MusicControl(){ Events.on(ClientLoadEvent.class, e -> reload()); - Events.on(ContentReloadEvent.class, e -> reload()); //only run music 10 seconds after a wave spawns Events.on(WaveEvent.class, e -> Time.run(60f * 10f, () -> { diff --git a/core/src/io/anuke/mindustry/mod/Mods.java b/core/src/io/anuke/mindustry/mod/Mods.java index d2483681ef..836c8679ae 100644 --- a/core/src/io/anuke/mindustry/mod/Mods.java +++ b/core/src/io/anuke/mindustry/mod/Mods.java @@ -257,9 +257,7 @@ public class Mods implements Loadable{ disabled.clear(); load(); buildFiles(); - Musics.dispose(); Sounds.dispose(); - Musics.load(); Sounds.load(); Core.assets.finishLoading(); content.clear(); diff --git a/core/src/io/anuke/mindustry/net/NetworkIO.java b/core/src/io/anuke/mindustry/net/NetworkIO.java index ff61c41f42..2e82e83fa1 100644 --- a/core/src/io/anuke/mindustry/net/NetworkIO.java +++ b/core/src/io/anuke/mindustry/net/NetworkIO.java @@ -28,6 +28,7 @@ public class NetworkIO{ stream.writeInt(player.id); player.write(stream); + SaveIO.getSaveWriter().writeContentHeader(stream); SaveIO.getSaveWriter().writeMap(stream); }catch(IOException e){ throw new RuntimeException(e); @@ -51,9 +52,12 @@ public class NetworkIO{ player.resetID(id); player.add(); + SaveIO.getSaveWriter().readContentHeader(stream); SaveIO.getSaveWriter().readMap(stream, world.context); }catch(IOException e){ throw new RuntimeException(e); + }finally{ + content.setTemporaryMapper(null); } }