quantum-space-buddies/QuantumUNET/Messages/QSBOwnerMessage.cs

22 lines
502 B
C#
Raw Normal View History

2020-12-15 16:37:52 +00:00
using QuantumUNET.Transport;
namespace QuantumUNET.Messages
2020-12-02 12:42:26 +00:00
{
2020-12-04 09:23:27 +00:00
internal class QSBOwnerMessage : QSBMessageBase
2020-12-02 12:42:26 +00:00
{
2020-12-15 09:56:03 +00:00
public QSBNetworkInstanceId NetId;
2020-12-03 11:56:32 +00:00
public short PlayerControllerId;
2020-12-04 09:23:27 +00:00
public override void Serialize(QSBNetworkWriter writer)
2020-12-02 12:42:26 +00:00
{
2020-12-03 11:56:32 +00:00
writer.Write(NetId);
writer.WritePackedUInt32((uint)PlayerControllerId);
2020-12-02 12:42:26 +00:00
}
2020-12-16 08:03:04 +00:00
public override void Deserialize(QSBNetworkReader reader)
{
NetId = reader.ReadNetworkId();
PlayerControllerId = (short)reader.ReadPackedUInt32();
}
2020-12-02 12:42:26 +00:00
}
2020-12-03 08:28:05 +00:00
}