quantum-space-buddies/QSB/AuthoritySync/AuthQueueMessage.cs

40 lines
766 B
C#
Raw Normal View History

2021-12-01 00:57:04 +00:00
using QSB.Messaging;
using QuantumUNET.Components;
using QuantumUNET.Transport;
2021-12-02 01:50:56 +00:00
namespace QSB.AuthoritySync
2021-12-01 00:57:04 +00:00
{
2021-12-18 04:11:38 +00:00
public class AuthQueueMessage : EnumMessage<AuthQueueAction>
2021-12-01 00:57:04 +00:00
{
public QNetworkIdentity Identity;
public override void Deserialize(QNetworkReader reader)
{
base.Deserialize(reader);
Identity = reader.ReadNetworkIdentity();
}
public override void Serialize(QNetworkWriter writer)
{
base.Serialize(writer);
writer.Write(Identity);
}
}
2021-12-18 04:11:38 +00:00
public enum AuthQueueAction
{
/// <summary>
/// add identity to the queue
/// </summary>
Add,
/// <summary>
/// remove identity from the queue
/// </summary>
Remove,
/// <summary>
/// add identity to the queue and force it to the front
/// </summary>
Force
}
2021-12-01 00:57:04 +00:00
}