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:
Joonas Rikkonen
2018-07-25 17:00:31 +03:00
parent d3d842eecd
commit 40f4e94613
2 changed files with 15 additions and 2 deletions
@@ -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;
}