(e42047dc1) Tester's build, January 30th 2020
This commit is contained in:
@@ -765,6 +765,11 @@ namespace Barotrauma.Networking
|
||||
|
||||
private void WriteEventErrorData(Client client, string errorStr)
|
||||
{
|
||||
if (!Directory.Exists(ServerLog.SavePath))
|
||||
{
|
||||
Directory.CreateDirectory(ServerLog.SavePath);
|
||||
}
|
||||
|
||||
string filePath = "event_error_log_server_" + client.Name + "_" + ToolBox.RemoveInvalidFileNameChars(DateTime.UtcNow.ToShortTimeString() + ".log");
|
||||
filePath = Path.Combine(ServerLog.SavePath, filePath);
|
||||
if (File.Exists(filePath)) { return; }
|
||||
@@ -774,6 +779,19 @@ namespace Barotrauma.Networking
|
||||
errorStr, ""
|
||||
};
|
||||
|
||||
if (GameMain.GameSession?.GameMode != null)
|
||||
{
|
||||
errorLines.Add("Game mode: " + GameMain.GameSession.GameMode.Name);
|
||||
}
|
||||
if (GameMain.GameSession?.Submarine != null)
|
||||
{
|
||||
errorLines.Add("Submarine: " + GameMain.GameSession.Submarine.Name);
|
||||
}
|
||||
if (Level.Loaded != null)
|
||||
{
|
||||
errorLines.Add("Level: " + Level.Loaded.Seed + ", " + Level.Loaded.EqualityCheckVal);
|
||||
}
|
||||
|
||||
errorLines.Add("Entity IDs:");
|
||||
List<Entity> sortedEntities = Entity.GetEntityList();
|
||||
sortedEntities.Sort((e1, e2) => e1.ID.CompareTo(e2.ID));
|
||||
@@ -797,6 +815,13 @@ namespace Barotrauma.Networking
|
||||
}
|
||||
}
|
||||
|
||||
errorLines.Add("");
|
||||
errorLines.Add("Last debug messages:");
|
||||
for (int i = DebugConsole.Messages.Count - 1; i > 0 && i > DebugConsole.Messages.Count - 15; i--)
|
||||
{
|
||||
errorLines.Add(" " + DebugConsole.Messages[i].Time + " - " + DebugConsole.Messages[i].Text);
|
||||
}
|
||||
|
||||
File.WriteAllLines(filePath, errorLines);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user