Add World parameter to Target.FromCell.

This commit is contained in:
Paul Chote
2013-09-17 21:50:15 +12:00
parent e4ea012b9e
commit 086ec07eb6
21 changed files with 36 additions and 37 deletions

View File

@@ -28,12 +28,12 @@ namespace OpenRA.Traits
int generation;
public static Target FromPos(WPos p) { return new Target { pos = p, type = TargetType.Terrain }; }
public static Target FromCell(CPos c) { return new Target { pos = c.CenterPosition, type = TargetType.Terrain }; }
public static Target FromCell(World w, CPos c) { return new Target { pos = c.CenterPosition, type = TargetType.Terrain }; }
public static Target FromOrder(World w, Order o)
{
return o.TargetActor != null
? FromActor(o.TargetActor)
: FromCell(o.TargetLocation);
: FromCell(w, o.TargetLocation);
}
public static Target FromActor(Actor a)