don't create players for playable slots which are empty

This commit is contained in:
Chris Forbes
2010-08-25 18:24:23 +12:00
parent 3c7015567e
commit def0580078

View File

@@ -24,7 +24,10 @@ namespace OpenRA.Mods.RA
int mapPlayerIndex = -1; int mapPlayerIndex = -1;
foreach (var kv in w.Map.Players) foreach (var kv in w.Map.Players)
{ {
if (kv.Value.Playable)
continue; // these will be created another way.
var player = new Player(w, kv.Value, mapPlayerIndex--); var player = new Player(w, kv.Value, mapPlayerIndex--);
w.AddPlayer(player); w.AddPlayer(player);
Players.Add(kv.Key,player); Players.Add(kv.Key,player);