Refactor player setup.

Tweak how players in a world are created. Change the collection to be an array to more strongly imply it will not change during a game.
This commit is contained in:
RoosterDragon
2015-11-27 15:00:29 +00:00
parent 3e8df55bcb
commit 23a38a08f7
3 changed files with 26 additions and 12 deletions

View File

@@ -164,10 +164,7 @@ namespace OpenRA.Mods.Common.Traits
var index = int.Parse(name.Substring(5));
if (index >= newCount)
{
Players.Players.Remove(name);
worldRenderer.World.Players.RemoveAll(pp => pp.InternalName == name);
}
}
for (var index = 0; index < newCount; index++)