damageDisabled removed from Cloak.cs (#12741)
To unhard code uncloak behavior getting disabled by the unit's critical HP.
This commit is contained in:
@@ -64,7 +64,6 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
INotifyAttack, ITick, IVisibilityModifier, IRadarColorModifier, INotifyCreated, INotifyHarvesterAction
|
INotifyAttack, ITick, IVisibilityModifier, IRadarColorModifier, INotifyCreated, INotifyHarvesterAction
|
||||||
{
|
{
|
||||||
[Sync] int remainingTime;
|
[Sync] int remainingTime;
|
||||||
[Sync] bool damageDisabled;
|
|
||||||
bool isDocking;
|
bool isDocking;
|
||||||
ConditionManager conditionManager;
|
ConditionManager conditionManager;
|
||||||
|
|
||||||
@@ -102,8 +101,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
|
|
||||||
void INotifyDamage.Damaged(Actor self, AttackInfo e)
|
void INotifyDamage.Damaged(Actor self, AttackInfo e)
|
||||||
{
|
{
|
||||||
damageDisabled = e.DamageState >= DamageState.Critical;
|
if (Info.UncloakOn.HasFlag(UncloakType.Damage))
|
||||||
if (damageDisabled || Info.UncloakOn.HasFlag(UncloakType.Damage))
|
|
||||||
Uncloak();
|
Uncloak();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,7 +126,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
{
|
{
|
||||||
if (!IsTraitDisabled)
|
if (!IsTraitDisabled)
|
||||||
{
|
{
|
||||||
if (remainingTime > 0 && !damageDisabled && !isDocking)
|
if (remainingTime > 0 && !isDocking)
|
||||||
remainingTime--;
|
remainingTime--;
|
||||||
|
|
||||||
if (self.IsDisabled())
|
if (self.IsDisabled())
|
||||||
|
|||||||
Reference in New Issue
Block a user