don't allow healing of fully-healed stuff

This commit is contained in:
Chris Forbes
2010-01-28 00:13:18 +13:00
parent cc4c137038
commit 5bd6c32aff

View File

@@ -188,6 +188,8 @@ namespace OpenRa.Traits
return null;
if (underCursor.Owner != self.Owner && !forceFire)
return null;
if (underCursor.Health >= underCursor.GetMaxHP())
return null; // don't allow healing of fully-healed stuff!
}
else
if ((underCursor.Owner == self.Owner || underCursor.Owner == null) && !forceFire)