diff --git a/core/src/io/anuke/mindustry/ai/Pathfind.java b/core/src/io/anuke/mindustry/ai/Pathfind.java index 6d81452a5f..61e8356444 100644 --- a/core/src/io/anuke/mindustry/ai/Pathfind.java +++ b/core/src/io/anuke/mindustry/ai/Pathfind.java @@ -173,7 +173,7 @@ public class Pathfind{ /**For an enemy that was just loaded from a save, find the node in the path it should be following.*/ void findNode(Enemy enemy){ - if(enemy.lane >= Vars.control.getSpawnPoints().size){ + if(enemy.lane >= Vars.control.getSpawnPoints().size || enemy.lane < 0){ enemy.lane = 0; } diff --git a/core/src/io/anuke/mindustry/core/NetClient.java b/core/src/io/anuke/mindustry/core/NetClient.java index d3a24a5179..0b770c7051 100644 --- a/core/src/io/anuke/mindustry/core/NetClient.java +++ b/core/src/io/anuke/mindustry/core/NetClient.java @@ -4,6 +4,7 @@ import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.utils.IntSet; import com.badlogic.gdx.utils.TimeUtils; +import io.anuke.mindustry.Mindustry; import io.anuke.mindustry.Vars; import io.anuke.mindustry.core.GameState.State; import io.anuke.mindustry.entities.Bullet; @@ -270,6 +271,8 @@ public class NetClient extends Module { if(player != null){ Gdx.app.postRunnable(player::remove); } + + Mindustry.platforms.updateRPC(); }); Net.handle(PlayerSpawnPacket.class, packet -> { @@ -291,6 +294,8 @@ public class NetClient extends Module { player.interpolator.last.set(player.x, player.y); player.interpolator.target.set(player.x, player.y); player.add(); + + Mindustry.platforms.updateRPC(); }); }); diff --git a/core/src/io/anuke/mindustry/io/versions/Save14.java b/core/src/io/anuke/mindustry/io/versions/Save14.java index 02ddf170b8..0335d38652 100644 --- a/core/src/io/anuke/mindustry/io/versions/Save14.java +++ b/core/src/io/anuke/mindustry/io/versions/Save14.java @@ -29,7 +29,6 @@ import static io.anuke.mindustry.Vars.android; public class Save14 extends SaveFileVersion{ - public Save14(){ super(14); } diff --git a/core/src/io/anuke/mindustry/io/versions/Save15.java b/core/src/io/anuke/mindustry/io/versions/Save15.java new file mode 100644 index 0000000000..ef19964a16 --- /dev/null +++ b/core/src/io/anuke/mindustry/io/versions/Save15.java @@ -0,0 +1,25 @@ +package io.anuke.mindustry.io.versions; + +import io.anuke.mindustry.io.SaveFileVersion; + +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.IOException; + +public class Save15 extends SaveFileVersion { + private Save14 save = new Save14(); + + public Save15(){ + super(15); + } + + @Override + public void read(DataInputStream stream) throws IOException { + + } + + @Override + public void write(DataOutputStream stream) throws IOException { + + } +} diff --git a/core/src/io/anuke/mindustry/world/blocks/types/distribution/Conveyor.java b/core/src/io/anuke/mindustry/world/blocks/types/distribution/Conveyor.java index 79b1167a4d..1c00087fe5 100644 --- a/core/src/io/anuke/mindustry/world/blocks/types/distribution/Conveyor.java +++ b/core/src/io/anuke/mindustry/world/blocks/types/distribution/Conveyor.java @@ -256,7 +256,7 @@ public class Conveyor extends Block{ ItemPos set(int value){ byte[] values = Bits.getBytes(value); - if(values[0] > Item.getAllItems().size) + if(values[0] >= Item.getAllItems().size || values[0] < 0) item = null; else item = Item.getAllItems().get(values[0]);