Some more debug logging
This commit is contained in:
@@ -1541,6 +1541,7 @@ namespace Barotrauma
|
||||
{
|
||||
list[i].Remove();
|
||||
}
|
||||
System.Diagnostics.Debug.Assert(list.Count == 0, "Some ragdolls were not removed in Ragdoll.RemoveAll");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,6 +125,14 @@ namespace Barotrauma
|
||||
DebugConsole.ThrowError("Error while removing entity \"" + e.ToString() + "\"", exception);
|
||||
}
|
||||
}
|
||||
if (dictionary.Count > 0)
|
||||
{
|
||||
DebugConsole.ThrowError("Some entities were not removed in Entity.RemoveAll:");
|
||||
foreach (Entity e in dictionary.Values)
|
||||
{
|
||||
DebugConsole.ThrowError(" - " + e.ToString() + "(ID " + e.id + ")");
|
||||
}
|
||||
}
|
||||
dictionary.Clear();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user