Remove bogus 'OrDefault' from UpgradeOnDamage

UpgradeManager is required anyway, so this was redundant.
This commit is contained in:
reaperrr
2016-08-13 00:00:28 +02:00
parent 0ec9725c2a
commit adeb2a19ca

View File

@@ -44,14 +44,11 @@ namespace OpenRA.Mods.Common.Traits
public UpgradeOnDamage(Actor self, UpgradeOnDamageInfo info)
{
this.info = info;
um = self.TraitOrDefault<UpgradeManager>();
um = self.Trait<UpgradeManager>();
}
void INotifyDamageStateChanged.DamageStateChanged(Actor self, AttackInfo e)
{
if (um == null)
return;
if (granted && info.GrantPermanently)
return;