Fixed removed (e.g. eaten) characters not appearing in the round summary, but still spawning during the next round

This commit is contained in:
Joonas Rikkonen
2017-10-05 21:18:01 +03:00
parent a740bf9a56
commit 57667b3169
6 changed files with 30 additions and 21 deletions
@@ -308,10 +308,13 @@ namespace Barotrauma
continue;
}
CharacterInfo deadInfo = CharacterInfos.Find(x => c.Info == x);
if (deadInfo != null) CharacterInfos.Remove(deadInfo);
CharacterInfos.Remove(c.Info);
}
//remove characterinfos whose character doesn't exist anymore
//(i.e. character was removed during the round)
CharacterInfos.RemoveAll(c => c.Character == null);
characters.Clear();
listBox.ClearChildren();
orderListBox.ClearChildren();