Merge pull request #4974 from ihptru/legacy-maps-fix
Adds spawn points to imported legacy maps Fixes #4794
This commit is contained in:
@@ -179,10 +179,20 @@ namespace OpenRA.Utility
|
|||||||
// Add waypoint actors
|
// Add waypoint actors
|
||||||
foreach (var kv in wps)
|
foreach (var kv in wps)
|
||||||
{
|
{
|
||||||
var a = new ActorReference("waypoint");
|
if (kv.First <= 7)
|
||||||
a.Add(new LocationInit((CPos)kv.Second));
|
{
|
||||||
a.Add(new OwnerInit("Neutral"));
|
var a = new ActorReference("mpspawn");
|
||||||
map.Actors.Value.Add("waypoint" + kv.First, a);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user