Handling exceptions in particle update, gamesession UI order fix, traitor setting loading fix

This commit is contained in:
Regalis
2016-11-16 20:14:14 +02:00
parent d37bad2d44
commit 16cf9f6c81
5 changed files with 18 additions and 5 deletions

View File

@@ -109,7 +109,18 @@ namespace Barotrauma.Particles
{
for (int i = 0; i < particleCount; i++)
{
if (!particles[i].Update(deltaTime)) RemoveParticle(i);
bool remove = false;
try
{
remove = !particles[i].Update(deltaTime);
}
catch (Exception e)
{
DebugConsole.ThrowError("Particle update failed", e);
remove = true;
}
if (remove) RemoveParticle(i);
}
}