private void OnOutgoingPacket(ReliablePacket packet, long now)
        {
            packet.Seq       = _outgoingPacketSeq++;
            packet.Ack       = _incomingPacketAck;
            packet.AckBuffer = _incomingPacketAckBuffer.Clone();

            _outgoingMessageTracker.Track(packet.Seq, packet.Messages);

            Logger.LogTrace($"Sending packet: PO-{packet.Seq} => {string.Join(", ", packet.Messages.Select(x => $"MO-{x.Seq}"))}");
            Logger.LogTrace($"Acking packets: PI-{packet.Ack} - {packet.AckBuffer}");
            Logger.LogTrace($"              : {string.Join(", ", packet.AckBuffer.AsBits().Select((x, i) => x ? $"PI-{packet.Ack - i}" : null).Where(x => x != null))}");
            foreach (var message in packet.Messages)
            {
                OnOutgoingMessage(message, now);
            }
        }
Beispiel #2
0
 public BitVector GetDirtyFlags()
 {
     return((BitVector)DirtyFlags.Clone());
 }