if there are no Playable playerrefs in the map, make as many as there are spawnpoints (hack)
This commit is contained in:
@@ -169,6 +169,17 @@ namespace OpenRA
|
||||
|
||||
default:
|
||||
throw new InvalidDataException("Map format {0} is not supported.".F(MapFormat));
|
||||
}
|
||||
|
||||
/* hack: make some slots. */
|
||||
if (!Players.Any(p => p.Value.Playable))
|
||||
{
|
||||
int index = 0;
|
||||
foreach (var wp in Waypoints)
|
||||
{
|
||||
var p = new PlayerReference("Multi{0}".F(index++), "Random", false, false) { Playable = true };
|
||||
Players.Add(p.Name, p);
|
||||
}
|
||||
}
|
||||
|
||||
// Smudges
|
||||
|
||||
Reference in New Issue
Block a user