#164 engineer cursor on friendly critical buildings

This commit is contained in:
Chris Forbes
2010-04-17 09:52:00 +12:00
parent d00cc78dea
commit e3ac2a4e88

View File

@@ -39,7 +39,10 @@ namespace OpenRA.Mods.RA
// 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);
}