Remove WVec.ToCVec.

This commit is contained in:
Paul Chote
2013-09-17 22:43:11 +12:00
parent 7b52fa52b6
commit 4bc09692e0
2 changed files with 2 additions and 3 deletions

View File

@@ -114,6 +114,5 @@ namespace OpenRA
public static class WorldCoordinateExtensions
{
public static CPos ToCPos(this WPos a) { return new CPos(a.X / 1024, a.Y / 1024); }
public static CVec ToCVec(this WVec a) { return new CVec(a.X / 1024, a.Y / 1024); }
}
}

View File

@@ -31,8 +31,8 @@ namespace OpenRA.Mods.RA
public void TickIdle(Actor self)
{
var offset = new WVec(0, -1024*Info.MoveRadius, 0).Rotate(WRot.FromFacing(self.World.SharedRandom.Next(255))).ToCVec();
self.Trait<AttackMove>().ResolveOrder(self, new Order("AttackMove", self, false) { TargetLocation = self.Location + offset });
var target = self.CenterPosition + new WVec(0, -1024*Info.MoveRadius, 0).Rotate(WRot.FromFacing(self.World.SharedRandom.Next(255)));
self.Trait<AttackMove>().ResolveOrder(self, new Order("AttackMove", self, false) { TargetLocation = target.ToCPos() });
}
}
}