2017-11-25 11:26:55 +01:00
|
|
|
|
|
2017-11-25 11:29:48 +01:00
|
|
|
|
namespace Network.PacketHandling.Packets {
|
2017-11-25 11:26:55 +01:00
|
|
|
|
public class SyncPkt : Serializable {
|
|
|
|
|
|
|
|
|
|
public int LastReliableIDReceived = -1;
|
|
|
|
|
public int LastUnreliableIDReceived = -1;
|
|
|
|
|
|
|
|
|
|
public int AmountOfUnreliablePackets = 0;
|
|
|
|
|
public int AmountOfReliablePackets = 0;
|
|
|
|
|
|
|
|
|
|
public override void WriteContents(PacketBuffer packetBuffer) {
|
|
|
|
|
packetBuffer.Write(LastReliableIDReceived);
|
|
|
|
|
packetBuffer.Write(LastUnreliableIDReceived);
|
|
|
|
|
|
|
|
|
|
packetBuffer.Write(AmountOfUnreliablePackets);
|
|
|
|
|
packetBuffer.Write(AmountOfReliablePackets);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void ReadContents(PacketBuffer packetBuffer) {
|
|
|
|
|
LastReliableIDReceived = packetBuffer.ReadInt();
|
|
|
|
|
LastUnreliableIDReceived = packetBuffer.ReadInt();
|
|
|
|
|
|
|
|
|
|
AmountOfUnreliablePackets = packetBuffer.ReadInt();
|
|
|
|
|
AmountOfReliablePackets = packetBuffer.ReadInt();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|