mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-20 15:41:01 +00:00
add comments to playermessage, change OnlySendToServer to OnlySendToHost
This commit is contained in:
parent
61ac35405e
commit
1d66baf1d8
@ -5,22 +5,34 @@ namespace QSB.Messaging
|
||||
{
|
||||
public class PlayerMessage : QMessageBase
|
||||
{
|
||||
/// <summary>
|
||||
/// The Player ID that is sending this message
|
||||
/// </summary>
|
||||
public uint FromId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The Player ID that this message is about
|
||||
/// </summary>
|
||||
public uint AboutId { get; set; }
|
||||
public bool OnlySendToServer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// If true, only send this message to the host of the current session
|
||||
/// (OnReceiveLocal/Remote is not called on any other client)
|
||||
/// </summary>
|
||||
public bool OnlySendToHost { get; set; }
|
||||
|
||||
public override void Deserialize(QNetworkReader reader)
|
||||
{
|
||||
FromId = reader.ReadUInt32();
|
||||
AboutId = reader.ReadUInt32();
|
||||
OnlySendToServer = reader.ReadBoolean();
|
||||
OnlySendToHost = reader.ReadBoolean();
|
||||
}
|
||||
|
||||
public override void Serialize(QNetworkWriter writer)
|
||||
{
|
||||
writer.Write(FromId);
|
||||
writer.Write(AboutId);
|
||||
writer.Write(OnlySendToServer);
|
||||
writer.Write(OnlySendToHost);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user