reuse CenterOfCell

This commit is contained in:
Chris Forbes
2009-12-08 20:21:24 +13:00
parent 4528ee4910
commit 073cdc202d
5 changed files with 22 additions and 22 deletions

View File

@@ -44,7 +44,7 @@ namespace OpenRa.Game.Traits
if (self.Location != targetLocation)
{
var dist = Game.CellSize * (targetLocation + new float2(.5f,.5f)) - self.CenterLocation;
var dist = Util.CenterOfCell(targetLocation) - self.CenterLocation;
var desiredFacing = Util.GetFacing(dist, unit.Facing);
Util.TickFacing(ref unit.Facing, desiredFacing,
self.Info.ROT);