Make sure actors are removed from control groups when captured

Fixes #5976.
This commit is contained in:
Oliver Brakmann
2014-07-20 02:49:58 +02:00
parent 6c1efac235
commit ff90a7559d

View File

@@ -65,7 +65,7 @@ namespace OpenRA
foreach (var cg in controlGroups.Values)
// note: NOT `!a.IsInWorld`, since that would remove things that are in transports.
cg.RemoveAll(a => a.Destroyed);
cg.RemoveAll(a => a.Destroyed || a.Owner != world.LocalPlayer);
}
Cache<int, List<Actor>> controlGroups = new Cache<int, List<Actor>>(_ => new List<Actor>());