Merge pull request #4974 from ihptru/legacy-maps-fix

Adds spawn points to imported legacy maps
Fixes #4794
This commit is contained in:
Matthias Mailänder
2014-03-29 09:30:30 +01:00

View File

@@ -179,10 +179,20 @@ namespace OpenRA.Utility
// Add waypoint actors
foreach (var kv in wps)
{
var a = new ActorReference("waypoint");
a.Add(new LocationInit((CPos)kv.Second));
a.Add(new OwnerInit("Neutral"));
map.Actors.Value.Add("waypoint" + kv.First, a);
if (kv.First <= 7)
{
var a = new ActorReference("mpspawn");
a.Add(new LocationInit((CPos)kv.Second));
a.Add(new OwnerInit("Neutral"));
map.Actors.Value.Add("Actor" + map.Actors.Value.Count.ToString(), a);
}
else
{
var a = new ActorReference("waypoint");
a.Add(new LocationInit((CPos)kv.Second));
a.Add(new OwnerInit("Neutral"));
map.Actors.Value.Add("waypoint" + kv.First, a);
}
}
}