Clients only include the last 20 console messages in the "invalid object header" error messages, and the console messages are not displayed in the console itself. Closes #569
This commit is contained in:
@@ -1048,17 +1048,16 @@ namespace Barotrauma.Networking
|
|||||||
errorLines.Add(" - " + e.ToString());
|
errorLines.Add(" - " + e.ToString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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)
|
foreach (string line in errorLines)
|
||||||
{
|
{
|
||||||
DebugConsole.ThrowError(line);
|
DebugConsole.ThrowError(line);
|
||||||
}
|
}
|
||||||
|
errorLines.Add("Last console messages:");
|
||||||
|
for (int i = DebugConsole.Messages.Count - 1; i > Math.Max(0, DebugConsole.Messages.Count - 20); i--)
|
||||||
|
{
|
||||||
|
errorLines.Add("[" + DebugConsole.Messages[i].Time + "] " + DebugConsole.Messages[i].Text);
|
||||||
|
}
|
||||||
GameAnalyticsManager.AddErrorEventOnce("GameClient.ReadInGameUpdate", GameAnalyticsSDK.Net.EGAErrorSeverity.Critical, string.Join("\n", errorLines));
|
GameAnalyticsManager.AddErrorEventOnce("GameClient.ReadInGameUpdate", GameAnalyticsSDK.Net.EGAErrorSeverity.Critical, string.Join("\n", errorLines));
|
||||||
|
|
||||||
DebugConsole.ThrowError("Writing object data to \"crashreport_object.bin\", please send this file to us at http://github.com/Regalis11/Barotrauma/issues");
|
DebugConsole.ThrowError("Writing object data to \"crashreport_object.bin\", please send this file to us at http://github.com/Regalis11/Barotrauma/issues");
|
||||||
|
|||||||
Reference in New Issue
Block a user