2020-08-13 21:46:16 +02:00
|
|
|
|
using QSB.Messaging;
|
2020-12-16 09:08:38 +00:00
|
|
|
|
using QuantumUNET.Transport;
|
2020-02-14 22:14:24 +01:00
|
|
|
|
|
2020-11-03 17:56:48 +00:00
|
|
|
|
namespace QSB.TimeSync.Events
|
2020-02-15 20:48:02 +01:00
|
|
|
|
{
|
2020-12-02 21:23:01 +00:00
|
|
|
|
public class ServerTimeMessage : PlayerMessage
|
|
|
|
|
{
|
|
|
|
|
public float ServerTime { get; set; }
|
|
|
|
|
public int LoopCount { get; set; }
|
2020-02-14 22:14:24 +01:00
|
|
|
|
|
2020-12-23 12:58:45 +00:00
|
|
|
|
public override void Deserialize(QNetworkReader reader)
|
2020-12-02 21:23:01 +00:00
|
|
|
|
{
|
|
|
|
|
base.Deserialize(reader);
|
|
|
|
|
ServerTime = reader.ReadSingle();
|
|
|
|
|
LoopCount = reader.ReadInt16();
|
|
|
|
|
}
|
2020-02-14 22:14:24 +01:00
|
|
|
|
|
2020-12-23 12:58:45 +00:00
|
|
|
|
public override void Serialize(QNetworkWriter writer)
|
2020-12-02 21:23:01 +00:00
|
|
|
|
{
|
|
|
|
|
base.Serialize(writer);
|
|
|
|
|
writer.Write(ServerTime);
|
|
|
|
|
writer.Write(LoopCount);
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-02-14 22:14:24 +01:00
|
|
|
|
}
|