Fix for "collection was modified" exceptions when removing entities using delete or Ctrl+X
This commit is contained in:
@@ -348,7 +348,7 @@ namespace Barotrauma
|
||||
|
||||
if (selectedList.Contains(this))
|
||||
{
|
||||
selectedList.Remove(this);
|
||||
selectedList = selectedList.FindAll(e => e != this);
|
||||
}
|
||||
|
||||
if (aiTarget != null) aiTarget.Remove();
|
||||
|
||||
Reference in New Issue
Block a user