Fixed incorrect debug info when receiving a message with an invalid object header. The method wrote the bytes/bits read SINCE the previous object (= just one byte, the invalid object header) instead of what was read in the previous object. The error message also ignored empty entity events.
This commit is contained in:
+6
@@ -140,7 +140,13 @@ namespace Barotrauma.Networking
|
||||
|
||||
if (entityID == 0)
|
||||
{
|
||||
if (GameSettings.VerboseLogging)
|
||||
{
|
||||
DebugConsole.NewMessage("received msg " + thisEventID + " (null entity)",
|
||||
Microsoft.Xna.Framework.Color.Orange);
|
||||
}
|
||||
msg.ReadPadBits();
|
||||
entities.Add(null);
|
||||
if (thisEventID == (UInt16)(lastReceivedID + 1)) lastReceivedID++;
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user