FillNetworkData uses NetBuffer instead of OutgoingMessage
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user