From e3ac2a4e88251fdd28e119f640659869430985ec Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Sat, 17 Apr 2010 09:52:00 +1200 Subject: [PATCH] #164 engineer cursor on friendly critical buildings --- OpenRA.Mods.RA/EngineerCapture.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.RA/EngineerCapture.cs b/OpenRA.Mods.RA/EngineerCapture.cs index bfdb551d45..81cfa847f7 100644 --- a/OpenRA.Mods.RA/EngineerCapture.cs +++ b/OpenRA.Mods.RA/EngineerCapture.cs @@ -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); }