Fixed "collection was modified" exceptions if a huskified human dies in a fire

This commit is contained in:
Regalis
2017-04-09 18:32:13 +03:00
parent e94a50a29a
commit 4ee96e4fbe
+2 -1
View File
@@ -245,8 +245,9 @@ namespace Barotrauma
{ {
if (size.X <= 0.0f) return; if (size.X <= 0.0f) return;
foreach (Character c in Character.CharacterList) for (int i = 0; i < Character.CharacterList.Count; i++)
{ {
Character c = Character.CharacterList[i];
if (c.AnimController.CurrentHull == null || c.IsDead) continue; if (c.AnimController.CurrentHull == null || c.IsDead) continue;
float range = (float)Math.Sqrt(size.X) * 20.0f; float range = (float)Math.Sqrt(size.X) * 20.0f;