FillNetworkData uses NetBuffer instead of OutgoingMessage

This commit is contained in:
Regalis
2015-11-04 20:21:34 +02:00
parent 9f9f0205e7
commit 5a21d64b3a
23 changed files with 36 additions and 39 deletions
@@ -124,7 +124,7 @@ namespace Barotrauma.Items.Components
base.Remove();
}
public override void FillNetworkData(Networking.NetworkEventType type, Lidgren.Network.NetOutgoingMessage message)
public override void FillNetworkData(Networking.NetworkEventType type, Lidgren.Network.NetBuffer message)
{
foreach (Connection c in connections)
{
@@ -137,7 +137,7 @@ namespace Barotrauma.Items.Components
}
}
public override void ReadNetworkData(Networking.NetworkEventType type, Lidgren.Network.NetIncomingMessage message)
public override void ReadNetworkData(Networking.NetworkEventType type, Lidgren.Network.NetBuffer message)
{
System.Diagnostics.Debug.WriteLine("connectionpanel update");
foreach (Connection c in connections)
@@ -428,7 +428,7 @@ namespace Barotrauma.Items.Components
base.Remove();
}
public override void FillNetworkData(Networking.NetworkEventType type, Lidgren.Network.NetOutgoingMessage message)
public override void FillNetworkData(Networking.NetworkEventType type, Lidgren.Network.NetBuffer message)
{
message.Write((byte)Math.Min(Nodes.Count, 10));
for (int i = 0; i < Math.Min(Nodes.Count,10); i++)
@@ -438,7 +438,7 @@ namespace Barotrauma.Items.Components
}
}
public override void ReadNetworkData(Networking.NetworkEventType type, Lidgren.Network.NetIncomingMessage message)
public override void ReadNetworkData(Networking.NetworkEventType type, Lidgren.Network.NetBuffer message)
{
Nodes.Clear();