Fixed build errors

This commit is contained in:
Anuken
2018-06-08 10:02:15 -04:00
parent 2bcbc3294b
commit 0bd0602655
5 changed files with 80 additions and 9 deletions
@@ -6,6 +6,13 @@ public abstract class NetConnection {
public final int id;
public final String address;
/**ID of last snapshot this connection is guaranteed to have recieved.*/
public int lastSnapshotID;
/**Byte array of last sent snapshot data that is confirmed to be recieved..*/
public byte[] lastSnapshot;
/**Byte array of last sent snapshot.*/
public byte[] lastSentSnapshot;
public NetConnection(int id, String address){
this.id = id;
this.address = address;
@@ -1,5 +1,17 @@
package io.anuke.mindustry.net;
import io.anuke.annotations.Annotations.Remote;
import io.anuke.mindustry.entities.Player;
public class NetEvents {
@Remote(one = true, all = false, unreliable = true)
public static void onSnapshot(byte[] snapshot, int snapshotID){
}
@Remote(unreliable = true, server = false)
public static void onRecievedSnapshot(Player player, int snapshotID){
Net.getConnection(player.clientid).lastSnapshotID = snapshotID;
}
}
+1 -1
View File
@@ -9,7 +9,7 @@ import io.anuke.mindustry.net.Packet.ImportantPacket;
import io.anuke.mindustry.net.Packet.UnimportantPacket;
import io.anuke.ucore.io.ByteBufferOutput;
import io.anuke.ucore.io.IOUtils;
import io.anuke.ucore.io.delta.ByteBufferInput;
import io.anuke.ucore.io.ByteBufferInput;
import java.nio.ByteBuffer;