if there are no Playable playerrefs in the map, make as many as there are spawnpoints (hack)
This commit is contained in:
@@ -171,6 +171,17 @@ namespace OpenRA
|
|||||||
throw new InvalidDataException("Map format {0} is not supported.".F(MapFormat));
|
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
|
// Smudges
|
||||||
foreach (var kv in yaml["Smudges"].Nodes)
|
foreach (var kv in yaml["Smudges"].Nodes)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ namespace OpenRA.Network
|
|||||||
public string Name;
|
public string Name;
|
||||||
public ClientState State;
|
public ClientState State;
|
||||||
public int Team;
|
public int Team;
|
||||||
|
public int Slot; // which slot we're in, or -1 for `observer`.
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Slot
|
public class Slot
|
||||||
|
|||||||
Reference in New Issue
Block a user