quantum-space-buddies/QuantumUNET/Messages/QSBOwnerMessage.cs
2020-12-16 08:03:04 +00:00

22 lines
502 B
C#

using QuantumUNET.Transport;
namespace QuantumUNET.Messages
{
internal class QSBOwnerMessage : QSBMessageBase
{
public QSBNetworkInstanceId NetId;
public short PlayerControllerId;
public override void Serialize(QSBNetworkWriter writer)
{
writer.Write(NetId);
writer.WritePackedUInt32((uint)PlayerControllerId);
}
public override void Deserialize(QSBNetworkReader reader)
{
NetId = reader.ReadNetworkId();
PlayerControllerId = (short)reader.ReadPackedUInt32();
}
}
}