The host can send chat messages, fixed client not being passed to ServerRead methods

This commit is contained in:
Regalis
2016-12-09 16:45:08 +02:00
parent e4744e8385
commit bea523187b
4 changed files with 21 additions and 6 deletions

View File

@@ -52,7 +52,7 @@ namespace Barotrauma.Networking
/// <summary>
/// Read the events from the message, ignoring ones we've already received
/// </summary>
protected void Read(NetIncomingMessage msg, float sendingTime, ref UInt32 lastReceivedID)
protected void Read(NetIncomingMessage msg, float sendingTime, ref UInt32 lastReceivedID, Client sender = null)
{
UInt32 firstEventID = msg.ReadUInt32();
int eventCount = msg.ReadByte();
@@ -75,7 +75,7 @@ namespace Barotrauma.Networking
{
DebugConsole.NewMessage("received msg "+thisEventID, Microsoft.Xna.Framework.Color.Green);
lastReceivedID++;
ReadEvent(msg, entity, sendingTime);
ReadEvent(msg, entity, sendingTime, sender);
}
msg.ReadPadBits();
}