diff --git a/Barotrauma/BarotraumaClient/Source/Networking/GameClient.cs b/Barotrauma/BarotraumaClient/Source/Networking/GameClient.cs index c794bd446..07829eb16 100644 --- a/Barotrauma/BarotraumaClient/Source/Networking/GameClient.cs +++ b/Barotrauma/BarotraumaClient/Source/Networking/GameClient.cs @@ -1044,6 +1044,12 @@ namespace Barotrauma.Networking } } + errorLines.Add("Last console messages:"); + for (int i = DebugConsole.Messages.Count - 1; i > 0; i--) + { + errorLines.Add("[" + DebugConsole.Messages[i].Time + "] " + DebugConsole.Messages[i].Text); + } + foreach (string line in errorLines) { DebugConsole.ThrowError(line); diff --git a/Barotrauma/BarotraumaClient/Source/Networking/NetEntityEvent/ClientEntityEventManager.cs b/Barotrauma/BarotraumaClient/Source/Networking/NetEntityEvent/ClientEntityEventManager.cs index f8cec2fe5..90e02538e 100644 --- a/Barotrauma/BarotraumaClient/Source/Networking/NetEntityEvent/ClientEntityEventManager.cs +++ b/Barotrauma/BarotraumaClient/Source/Networking/NetEntityEvent/ClientEntityEventManager.cs @@ -159,23 +159,24 @@ namespace Barotrauma.Networking //skip the event if we've already received it or if the entity isn't found if (thisEventID != (UInt16)(lastReceivedID + 1) || entity == null) { - if (GameSettings.VerboseLogging) + if (thisEventID != (UInt16) (lastReceivedID + 1)) { - if (thisEventID != (UInt16) (lastReceivedID + 1)) + if (GameSettings.VerboseLogging) { DebugConsole.NewMessage( - "received msg " + thisEventID + " (waiting for " + (lastReceivedID + 1) + ")", + "Received msg " + thisEventID + " (waiting for " + (lastReceivedID + 1) + ")", thisEventID < lastReceivedID + 1 ? Microsoft.Xna.Framework.Color.Yellow : Microsoft.Xna.Framework.Color.Red); } - else if (entity == null) - { - DebugConsole.NewMessage( - "received msg " + thisEventID + ", entity " + entityID + " not found", - Microsoft.Xna.Framework.Color.Red); - } } + else if (entity == null) + { + DebugConsole.NewMessage( + "Received msg " + thisEventID + ", entity " + entityID + " not found", + Microsoft.Xna.Framework.Color.Red); + } + msg.Position += msgLength * 8; } else