Don't add mpspawns when importing single-player maps.
This commit is contained in:
@@ -35,6 +35,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
public Map Map;
|
||||
public List<string> Players = new List<string>();
|
||||
public MapPlayers MapPlayers;
|
||||
bool singlePlayer;
|
||||
int spawnCount;
|
||||
|
||||
public bool ValidateArguments(string[] args)
|
||||
@@ -55,6 +56,11 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
{
|
||||
var file = new IniFile(stream);
|
||||
var basic = file.GetSection("Basic");
|
||||
|
||||
var player = basic.GetValue("Player", string.Empty);
|
||||
if (!string.IsNullOrEmpty(player))
|
||||
singlePlayer = !player.StartsWith("Multi");
|
||||
|
||||
var mapSection = file.GetSection("Map");
|
||||
|
||||
var format = GetMapFormatVersion(basic);
|
||||
@@ -252,7 +258,7 @@ namespace OpenRA.Mods.Common.UtilityCommands
|
||||
// Add waypoint actors
|
||||
foreach (var kv in wps)
|
||||
{
|
||||
if (kv.First <= 7)
|
||||
if (!singlePlayer && kv.First <= 7)
|
||||
{
|
||||
var ar = new ActorReference("mpspawn")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user