Example #1
0
 public NetcodeMetadataPacket(XEventArgs args)
 {
     if (args == null)
     {
         MetadataDefined = false;
         OriginatorID    = 0;
         EventID         = -1;
         EventNameLength = 0;
         EventName       = "";
         Payload         = new byte[0];
     }
     else
     {
         MetadataDefined = true;
         OriginatorID    = args.OriginatorID;
         EventID         = args.EventID;
         EventNameLength = (byte)Encoding.UTF8.GetByteCount(args.EventName);
         EventName       = args.EventName;
         Payload         = args.SerializeToBitstream();
     }
 }
Example #2
0
 //TODO: bring this to parity with the all-client version
 public virtual void SendMessage(IClientAdapter client, XEventArgs data)
 {
     data.OriginatorID = ID;
     SendRawData(client, data.SerializeToBitstream());
 }