wtf; MEDI was really borked

This commit is contained in:
Chris Forbes
2009-12-31 16:32:05 +13:00
parent d0c13c44b2
commit 493e207bbf
3 changed files with 5 additions and 3 deletions

View File

@@ -142,7 +142,9 @@ namespace OpenRa.Game.Traits
{
if (mi.Button == MouseButton.Left || underCursor == null) return null;
if (self == underCursor) return null;
if (underCursor.Owner == self.Owner && !mi.Modifiers.HasModifier( Modifiers.Ctrl )) return null;
var isHeal = Rules.WeaponInfo[self.Info.Primary].Damage < 0;
if (((underCursor.Owner == self.Owner) ^ isHeal)
&& !mi.Modifiers.HasModifier( Modifiers.Ctrl )) return null;
if (!Combat.HasAnyValidWeapons(self, underCursor)) return null;
return new Order("Attack", self, underCursor, int2.Zero, null);
}