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

View File

@@ -65,7 +65,7 @@ namespace Barotrauma
dictionary.Add(id, this);
}
public virtual bool FillNetworkData(NetworkEventType type, NetOutgoingMessage message, object data)
public virtual bool FillNetworkData(NetworkEventType type, NetBuffer message, object data)
{
return false;
}

View File

@@ -6,6 +6,7 @@ using System.Xml.Linq;
using FarseerPhysics;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Lidgren.Network;
namespace Barotrauma
{
@@ -471,7 +472,7 @@ namespace Barotrauma
h.ID = (ushort)int.Parse(element.Attribute("ID").Value);
}
public override bool FillNetworkData(Networking.NetworkEventType type, Lidgren.Network.NetOutgoingMessage message, object data)
public override bool FillNetworkData(Networking.NetworkEventType type, NetBuffer message, object data)
{
message.WriteRangedSingle(MathHelper.Clamp(volume/FullVolume, 0.0f, 1.5f), 0.0f, 1.5f, 6);

View File

@@ -636,7 +636,7 @@ namespace Barotrauma
}
public override bool FillNetworkData(NetworkEventType type, NetOutgoingMessage message, object data)
public override bool FillNetworkData(NetworkEventType type, NetBuffer message, object data)
{
message.Write((float)NetTime.Now);

View File

@@ -383,7 +383,7 @@ namespace Barotrauma
Level.Loaded.Move(-amount);
}
public override bool FillNetworkData(Networking.NetworkEventType type, NetOutgoingMessage message, object data)
public override bool FillNetworkData(Networking.NetworkEventType type, NetBuffer message, object data)
{
if (subBody == null) return false;