Changes to map.cs, rename IPositionable.IsLeaving{ => Cell}, add IPositionable.GetValidSubCell
This commit is contained in:
@@ -41,7 +41,7 @@ namespace OpenRA.Mods.RA.Activities
|
||||
mobile.IsMoving = true;
|
||||
|
||||
from = self.CenterPosition;
|
||||
to = self.World.Map.CenterOf(targetMobile.fromCell, targetMobile.fromSubCell);
|
||||
to = self.World.Map.CenterOfSubCell(targetMobile.fromCell, targetMobile.fromSubCell);
|
||||
length = Math.Max((to - from).Length / speed.Range, 1);
|
||||
|
||||
self.Trait<RenderInfantry>().Attacking(self, Target.FromActor(target));
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace OpenRA.Mods.RA.Activities
|
||||
|
||||
return cargo.CurrentAdjacentCells
|
||||
.Shuffle(self.World.SharedRandom)
|
||||
.Select(c => Pair.New(c, pos.GetAvailableSubcell(c, SubCell.AnySubCell, null)))
|
||||
.Select(c => Pair.New(c, pos.GetAvailableSubCell(c)))
|
||||
.Cast<Pair<CPos, SubCell>?>()
|
||||
.FirstOrDefault(s => s.Value.Second != SubCell.InvalidSubCell);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user