Skip to content

Commit

Permalink
Fix capturing etc
Browse files Browse the repository at this point in the history
  • Loading branch information
pchote committed Feb 5, 2011
1 parent 4b0ab1c commit de26b63
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions OpenRA.Mods.RA/Move/Mobile.cs
Expand Up @@ -308,7 +308,7 @@ public string VoicePhraseForOrder(Actor self, Order order)
}
}

public SubCell GetDesiredSubcell(int2 a)
public SubCell GetDesiredSubcell(int2 a, Actor ignoreActor)
{
if (!Info.SharesCell)
return SubCell.FullCell;
Expand All @@ -317,7 +317,7 @@ public SubCell GetDesiredSubcell(int2 a)
return new[]{ __fromSubCell, SubCell.TopLeft, SubCell.TopRight, SubCell.Center,
SubCell.BottomLeft, SubCell.BottomRight}.First(b =>
{
var blockingActors = uim.GetUnitsAt(a,b);
var blockingActors = uim.GetUnitsAt(a,b).Where(c => c != ignoreActor);
if (blockingActors.Count() > 0)
{
// Non-sharable unit can enter a cell with shareable units only if it can crush all of them
Expand Down
2 changes: 1 addition & 1 deletion OpenRA.Mods.RA/Move/Move.cs
Expand Up @@ -229,7 +229,7 @@ void NudgeBlocker(Actor self, int2 nextCell)
hasWaited = false;
path.RemoveAt( path.Count - 1 );

var subCell = mobile.GetDesiredSubcell(nextCell);
var subCell = mobile.GetDesiredSubcell(nextCell, ignoreBuilding);
return Pair.New(nextCell, subCell);
}

Expand Down

0 comments on commit de26b63

Please sign in to comment.