Fixed build errors
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user