Enforce a line length limit.
This commit is contained in:
@@ -51,7 +51,8 @@ namespace OpenRA.Mods.Common.Activities
|
||||
protected virtual void Unreserve(Actor self, bool abort) { }
|
||||
protected virtual void OnInside(Actor self) { }
|
||||
|
||||
protected bool TryGetAlternateTargetInCircle(Actor self, WRange radius, Action<Target> update, Func<Actor, bool> primaryFilter, Func<Actor, bool>[] preferenceFilters = null)
|
||||
protected bool TryGetAlternateTargetInCircle(
|
||||
Actor self, WRange radius, Action<Target> update, Func<Actor, bool> primaryFilter, Func<Actor, bool>[] preferenceFilters = null)
|
||||
{
|
||||
var radiusSquared = radius.Range * radius.Range;
|
||||
var diff = new WVec(radius, radius, WRange.Zero);
|
||||
|
||||
@@ -181,10 +181,14 @@ namespace OpenRA.Mods.Common.Activities
|
||||
else
|
||||
{
|
||||
mobile.SetLocation(mobile.FromCell, mobile.FromSubCell, nextCell.Value.First, nextCell.Value.Second);
|
||||
var from = self.World.Map.CenterOfSubCell(mobile.FromCell, mobile.FromSubCell);
|
||||
var to = Util.BetweenCells(self.World, mobile.FromCell, mobile.ToCell) +
|
||||
(self.World.Map.OffsetOfSubCell(mobile.FromSubCell) +
|
||||
self.World.Map.OffsetOfSubCell(mobile.ToSubCell)) / 2;
|
||||
var move = new MoveFirstHalf(
|
||||
this,
|
||||
self.World.Map.CenterOfSubCell(mobile.FromCell, mobile.FromSubCell),
|
||||
Util.BetweenCells(self.World, mobile.FromCell, mobile.ToCell) + (self.World.Map.OffsetOfSubCell(mobile.FromSubCell) + self.World.Map.OffsetOfSubCell(mobile.ToSubCell)) / 2,
|
||||
from,
|
||||
to,
|
||||
mobile.Facing,
|
||||
mobile.Facing,
|
||||
0);
|
||||
|
||||
Reference in New Issue
Block a user