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
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user