diff --git a/.gitignore b/.gitignore index 71869acd34..e3a4dab650 100644 --- a/.gitignore +++ b/.gitignore @@ -4,10 +4,11 @@ /desktop/packr-out/ /desktop/packr-export/ /desktop/mindustry-saves/ -/destkop/mindustry-maps/ +/destkop/mindustry-maps/* /core/lib/ *.gif +.attach_* ## Java *.class diff --git a/core/src/io/anuke/mindustry/core/Control.java b/core/src/io/anuke/mindustry/core/Control.java index c358dcc053..939044289a 100644 --- a/core/src/io/anuke/mindustry/core/Control.java +++ b/core/src/io/anuke/mindustry/core/Control.java @@ -130,7 +130,6 @@ public class Control extends Module{ public void reset(){ weapons.clear(); - renderer.clearTiles(); weapons.add(Weapon.blaster); player.weapon = weapons.first(); @@ -161,7 +160,6 @@ public class Control extends Module{ public void play(){ if(core == null) return; - renderer.clearTiles(); player.x = core.worldx(); diff --git a/core/src/io/anuke/mindustry/core/Renderer.java b/core/src/io/anuke/mindustry/core/Renderer.java index 1b07076bb6..d0fd56c5cf 100644 --- a/core/src/io/anuke/mindustry/core/Renderer.java +++ b/core/src/io/anuke/mindustry/core/Renderer.java @@ -489,7 +489,7 @@ public class Renderer extends RendererModule{ cache = null; if(cbatch != null) cbatch.dispose(); - cbatch = new CacheBatch(256 * 256 * 3); + cbatch = new CacheBatch(Vars.world.width() * Vars.world.height() * 3); } void drawPaths(){ diff --git a/core/src/io/anuke/mindustry/io/SaveIO.java b/core/src/io/anuke/mindustry/io/SaveIO.java index 5646a82431..01f8f2ae0f 100644 --- a/core/src/io/anuke/mindustry/io/SaveIO.java +++ b/core/src/io/anuke/mindustry/io/SaveIO.java @@ -115,7 +115,11 @@ public class SaveIO{ public static boolean isSaveValid(int slot){ try(DataInputStream stream = new DataInputStream(fileFor(slot).read())){ - return stream.readInt() == fileVersionID; + int version = stream.readInt(); //read version + stream.readLong(); //read last saved time + stream.readByte(); //read the gamemode + byte map = stream.readByte(); //read the map + return version == fileVersionID && Vars.world.maps().getMap(map) != null; }catch (Exception e){ return false; } diff --git a/desktop/.attach_pid16116 b/desktop/.attach_pid16116 deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/desktop/mindustry-maps/custom.png b/desktop/mindustry-maps/custom.png deleted file mode 100644 index 9cafbf199f..0000000000 Binary files a/desktop/mindustry-maps/custom.png and /dev/null differ diff --git a/desktop/mindustry-maps/desert2.png b/desktop/mindustry-maps/desert2.png deleted file mode 100644 index 12ded3b574..0000000000 Binary files a/desktop/mindustry-maps/desert2.png and /dev/null differ diff --git a/desktop/mindustry-maps/desert23.png b/desktop/mindustry-maps/desert23.png deleted file mode 100644 index 12ded3b574..0000000000 Binary files a/desktop/mindustry-maps/desert23.png and /dev/null differ diff --git a/desktop/mindustry-maps/desert2asd.png b/desktop/mindustry-maps/desert2asd.png deleted file mode 100644 index 12ded3b574..0000000000 Binary files a/desktop/mindustry-maps/desert2asd.png and /dev/null differ diff --git a/desktop/mindustry-maps/island2.png b/desktop/mindustry-maps/island2.png deleted file mode 100644 index 12ded3b574..0000000000 Binary files a/desktop/mindustry-maps/island2.png and /dev/null differ diff --git a/desktop/mindustry-maps/maps.json b/desktop/mindustry-maps/maps.json deleted file mode 100644 index 52840a2510..0000000000 --- a/desktop/mindustry-maps/maps.json +++ /dev/null @@ -1 +0,0 @@ -{"maps":[]} \ No newline at end of file diff --git a/desktop/mindustry-maps/maze2.png b/desktop/mindustry-maps/maze2.png deleted file mode 100644 index 4ed536eef2..0000000000 Binary files a/desktop/mindustry-maps/maze2.png and /dev/null differ diff --git a/desktop/mindustry-maps/moremap.png b/desktop/mindustry-maps/moremap.png deleted file mode 100644 index 9ba9e46745..0000000000 Binary files a/desktop/mindustry-maps/moremap.png and /dev/null differ diff --git a/desktop/mindustry-maps/sadfa.png b/desktop/mindustry-maps/sadfa.png deleted file mode 100644 index 8223292cf4..0000000000 Binary files a/desktop/mindustry-maps/sadfa.png and /dev/null differ diff --git a/desktop/mindustry-maps/spiral12.png b/desktop/mindustry-maps/spiral12.png deleted file mode 100644 index 8223292cf4..0000000000 Binary files a/desktop/mindustry-maps/spiral12.png and /dev/null differ diff --git a/desktop/mindustry-maps/trash.png b/desktop/mindustry-maps/trash.png deleted file mode 100644 index 6a08dac9e6..0000000000 Binary files a/desktop/mindustry-maps/trash.png and /dev/null differ diff --git a/desktop/mindustry-maps/tundra213123.png b/desktop/mindustry-maps/tundra213123.png deleted file mode 100644 index 09aa83745c..0000000000 Binary files a/desktop/mindustry-maps/tundra213123.png and /dev/null differ diff --git a/desktop/mindustry-maps/wonderifthisworks.png b/desktop/mindustry-maps/wonderifthisworks.png deleted file mode 100644 index ff50c808d1..0000000000 Binary files a/desktop/mindustry-maps/wonderifthisworks.png and /dev/null differ diff --git a/desktop/mindustry-maps/wowmap.png b/desktop/mindustry-maps/wowmap.png deleted file mode 100644 index 2470f5158a..0000000000 Binary files a/desktop/mindustry-maps/wowmap.png and /dev/null differ