From caffbe2100f71b1abe46fd03ecec54ba6ac75eee Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Sat, 11 Dec 2021 00:46:55 -0800 Subject: [PATCH] slight documentation --- QSB/Messaging/QSBMessage.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/QSB/Messaging/QSBMessage.cs b/QSB/Messaging/QSBMessage.cs index 8c06a8b8..3a965189 100644 --- a/QSB/Messaging/QSBMessage.cs +++ b/QSB/Messaging/QSBMessage.cs @@ -6,21 +6,29 @@ namespace QSB.Messaging { public abstract class QSBMessage : QMessageBase { + /// set automatically when sending a message public uint From; + /// + /// uint.MaxValue = send to everyone
+ /// 0 = send to host + ///
public uint To = uint.MaxValue; + /// call the base method when overriding public override void Serialize(QNetworkWriter writer) { writer.Write(From); writer.Write(To); } + /// call the base method when overriding public override void Deserialize(QNetworkReader reader) { From = reader.ReadUInt32(); To = reader.ReadUInt32(); } + /// checked before calling either OnReceive public virtual bool ShouldReceive => true; public virtual void OnReceiveRemote() { } public virtual void OnReceiveLocal() { }