Add World parameter to Target.FromCell.
This commit is contained in:
@@ -114,13 +114,13 @@ namespace OpenRA.Mods.RA.Activities
|
||||
if (harv.LastOrderLocation == null)
|
||||
harv.LastOrderLocation = path[0];
|
||||
|
||||
self.SetTargetLine(Target.FromCell(path[0]), Color.Red, false);
|
||||
self.SetTargetLine(Target.FromCell(self.World, path[0]), Color.Red, false);
|
||||
return Util.SequenceActivities(mobile.MoveTo(path[0], 1), new HarvestResource(), new FindResources());
|
||||
}
|
||||
|
||||
public override IEnumerable<Target> GetTargets(Actor self)
|
||||
{
|
||||
yield return Target.FromCell(self.Location);
|
||||
yield return Target.FromCell(self.World, self.Location);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace OpenRA.Mods.RA.Activities
|
||||
actor.CancelActivity();
|
||||
pos.SetVisualPosition(actor, spawn);
|
||||
actor.QueueActivity(move.MoveIntoWorld(actor, exitCell.Value));
|
||||
actor.SetTargetLine(Target.FromCell(exitCell.Value), Color.Green, false);
|
||||
actor.SetTargetLine(Target.FromCell(w, exitCell.Value), Color.Green, false);
|
||||
});
|
||||
|
||||
if (!unloadAll || cargo.IsEmpty(self))
|
||||
|
||||
Reference in New Issue
Block a user