Skip to content

Commit

Permalink
Merge pull request #12161 from abcdefg30/uncloakDamage
Browse files Browse the repository at this point in the history
Fix UncloakOn: Damage only working when the damage state changes
  • Loading branch information
reaperrr committed Oct 9, 2016
2 parents d0493bb + d57c476 commit 22a90c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions OpenRA.Mods.Common/Traits/Cloak.cs
Expand Up @@ -60,7 +60,7 @@ public class CloakInfo : UpgradableTraitInfo
public override object Create(ActorInitializer init) { return new Cloak(this); }
}

public class Cloak : UpgradableTrait<CloakInfo>, IRenderModifier, INotifyDamageStateChanged,
public class Cloak : UpgradableTrait<CloakInfo>, IRenderModifier, INotifyDamage,
INotifyAttack, ITick, IVisibilityModifier, IRadarColorModifier, INotifyCreated, INotifyHarvesterAction
{
[Sync] int remainingTime;
Expand Down Expand Up @@ -100,7 +100,7 @@ void INotifyCreated.Created(Actor self)

void INotifyAttack.PreparingAttack(Actor self, Target target, Armament a, Barrel barrel) { }

void INotifyDamageStateChanged.DamageStateChanged(Actor self, AttackInfo e)
void INotifyDamage.Damaged(Actor self, AttackInfo e)
{
damageDisabled = e.DamageState >= DamageState.Critical;
if (damageDisabled || Info.UncloakOn.HasFlag(UncloakType.Damage))
Expand Down

0 comments on commit 22a90c5

Please sign in to comment.