Make UncloakOn Damage check sign with added Heal value for UncloakOn.

This commit is contained in:
atlimit8
2017-03-14 22:37:43 -05:00
parent 3aeddbf9bd
commit 8e7de1a4fa

View File

@@ -29,7 +29,8 @@ namespace OpenRA.Mods.Common.Traits
Infiltrate = 8,
Demolish = 16,
Damage = 32,
Dock = 64
Heal = 64,
Dock = 128
}
[Desc("This unit can cloak and uncloak in specific situations.")]
@@ -101,7 +102,10 @@ namespace OpenRA.Mods.Common.Traits
void INotifyDamage.Damaged(Actor self, AttackInfo e)
{
if (Info.UncloakOn.HasFlag(UncloakType.Damage))
if (e.Damage.Value == 0)
return;
if (Info.UncloakOn.HasFlag(e.Damage.Value > 0 ? UncloakType.Damage : UncloakType.Heal))
Uncloak();
}