New types for cell and pixel coordinate position/vectors.

This commit is contained in:
James Dunne
2012-06-20 23:22:27 -05:00
parent 0b98a8ce5e
commit 9c49143534
162 changed files with 1291 additions and 865 deletions

View File

@@ -149,7 +149,7 @@ namespace OpenRA.Mods.RA
if( target.IsActor )
return new Order("Attack", self, queued) { TargetActor = target.Actor };
else
return new Order( "Attack", self, queued ) { TargetLocation = Util.CellContaining( target.CenterLocation ) };
return new Order( "Attack", self, queued ) { TargetLocation = target.CenterLocation.ToCPos() };
}
return null;
}
@@ -217,7 +217,7 @@ namespace OpenRA.Mods.RA
return self.Owner.Stances[ target.Owner ] == targetableRelationship;
}
public bool CanTargetLocation(Actor self, int2 location, List<Actor> actorsAtLocation, bool forceAttack, bool forceQueued, ref string cursor)
public bool CanTargetLocation(Actor self, CPos location, List<Actor> actorsAtLocation, bool forceAttack, bool forceQueued, ref string cursor)
{
if (!self.World.Map.IsInMap(location))
return false;