Remove WVec.ToCVec.
This commit is contained in:
@@ -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); }
|
||||
}
|
||||
}
|
||||
@@ -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() });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user