mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-17 01:13:05 +00:00
cleanup qsbreconnectmessage
This commit is contained in:
parent
442db9372e
commit
6ec83dac94
@ -4,31 +4,27 @@ namespace QuantumUNET
|
||||
{
|
||||
public class QSBReconnectMessage : QSBMessageBase
|
||||
{
|
||||
public int oldConnectionId;
|
||||
public short playerControllerId;
|
||||
public NetworkInstanceId netId;
|
||||
public int msgSize;
|
||||
public byte[] msgData;
|
||||
|
||||
public override void Deserialize(QSBNetworkReader reader)
|
||||
{
|
||||
this.oldConnectionId = (int)reader.ReadPackedUInt32();
|
||||
this.playerControllerId = (short)reader.ReadPackedUInt32();
|
||||
this.netId = reader.ReadNetworkId();
|
||||
this.msgData = reader.ReadBytesAndSize();
|
||||
this.msgSize = this.msgData.Length;
|
||||
oldConnectionId = (int)reader.ReadPackedUInt32();
|
||||
playerControllerId = (short)reader.ReadPackedUInt32();
|
||||
netId = reader.ReadNetworkId();
|
||||
msgData = reader.ReadBytesAndSize();
|
||||
msgSize = msgData.Length;
|
||||
}
|
||||
|
||||
public override void Serialize(QSBNetworkWriter writer)
|
||||
{
|
||||
writer.WritePackedUInt32((uint)this.oldConnectionId);
|
||||
writer.WritePackedUInt32((uint)this.playerControllerId);
|
||||
writer.Write(this.netId);
|
||||
writer.WriteBytesAndSize(this.msgData, this.msgSize);
|
||||
writer.WritePackedUInt32((uint)oldConnectionId);
|
||||
writer.WritePackedUInt32((uint)playerControllerId);
|
||||
writer.Write(netId);
|
||||
writer.WriteBytesAndSize(msgData, msgSize);
|
||||
}
|
||||
|
||||
public int oldConnectionId;
|
||||
|
||||
public short playerControllerId;
|
||||
|
||||
public NetworkInstanceId netId;
|
||||
|
||||
public int msgSize;
|
||||
|
||||
public byte[] msgData;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user