NetworkEvents can be sent using Lidgren's reliable delivery method

This commit is contained in:
Regalis11
2016-01-31 18:09:24 +02:00
parent 7f78582df7
commit 91a0033025
5 changed files with 39 additions and 23 deletions

View File

@@ -126,11 +126,11 @@ namespace Barotrauma.Networking
Voting = new Voting();
}
protected NetOutgoingMessage ComposeNetworkEventMessage(bool isImportant, NetConnection excludedConnection = null)
protected NetOutgoingMessage ComposeNetworkEventMessage(NetworkEventDeliveryMethod deliveryMethod, NetConnection excludedConnection = null)
{
if (netPeer == null) return null;
var events = NetworkEvent.Events.FindAll(e => e.IsImportant == isImportant);
var events = NetworkEvent.Events.FindAll(e => e.DeliveryMethod == deliveryMethod);
if (events.Count == 0) return null;
List<byte[]> msgBytes = new List<byte[]>();