Skip to content

Commit

Permalink
#164 engineer cursor on friendly critical buildings
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisforbes committed Apr 17, 2010
1 parent d00cc78 commit e3ac2a4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion OpenRA.Mods.RA/EngineerCapture.cs
Expand Up @@ -39,7 +39,10 @@ public Order IssueOrder(Actor self, int2 xy, MouseInput mi, Actor underCursor)
// todo: other bits
if (underCursor.Owner == null) return null; // don't allow capturing of bridges, etc.

return new Order(underCursor.Health <= EngineerDamage ? "Capture" : "Infiltrate",
var isCapture = underCursor.Health <= EngineerDamage &&
self.Owner.Stances[underCursor.Owner] != Stance.Ally;

return new Order(isCapture ? "Capture" : "Infiltrate",
self, underCursor);
}

Expand Down

0 comments on commit e3ac2a4

Please sign in to comment.