Replace WPos.ToCPos -> Map.CellContaining.
This commit is contained in:
@@ -107,7 +107,7 @@ namespace OpenRA.Mods.RA
|
||||
case TargetType.FrozenActor:
|
||||
return new Order("Attack", self, queued) { ExtraData = target.FrozenActor.ID };
|
||||
case TargetType.Terrain:
|
||||
return new Order("Attack", self, queued) { TargetLocation = target.CenterPosition.ToCPos() };
|
||||
return new Order("Attack", self, queued) { TargetLocation = self.World.Map.CellContaining(target.CenterPosition) };
|
||||
}
|
||||
}
|
||||
|
||||
@@ -241,7 +241,7 @@ namespace OpenRA.Mods.RA
|
||||
case TargetType.FrozenActor:
|
||||
return CanTargetActor(self, target, modifiers, ref cursor);
|
||||
case TargetType.Terrain:
|
||||
return CanTargetLocation(self, target.CenterPosition.ToCPos(), othersAtTarget, modifiers, ref cursor);
|
||||
return CanTargetLocation(self, self.World.Map.CellContaining(target.CenterPosition), othersAtTarget, modifiers, ref cursor);
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace OpenRA.Mods.RA
|
||||
public void TickIdle(Actor self)
|
||||
{
|
||||
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() });
|
||||
self.Trait<AttackMove>().ResolveOrder(self, new Order("AttackMove", self, false) { TargetLocation = self.World.Map.CellContaining(target) });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user