From cef940fea9dd2b4c71db5a033b2e51860473052d Mon Sep 17 00:00:00 2001 From: reaperrr Date: Mon, 21 Oct 2019 19:29:42 +0200 Subject: [PATCH] Fix TakeCover to be disabled properly Speed and Damage modifiers were ignoring IsTraitDisabled. --- OpenRA.Mods.Common/Traits/Infantry/TakeCover.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Traits/Infantry/TakeCover.cs b/OpenRA.Mods.Common/Traits/Infantry/TakeCover.cs index 59331fc5cd..6886971e45 100644 --- a/OpenRA.Mods.Common/Traits/Infantry/TakeCover.cs +++ b/OpenRA.Mods.Common/Traits/Infantry/TakeCover.cs @@ -43,10 +43,11 @@ namespace OpenRA.Mods.Common.Traits public class TakeCover : Turreted, INotifyDamage, IDamageModifier, ISpeedModifier, ISync, IRenderInfantrySequenceModifier { readonly TakeCoverInfo info; + [Sync] int remainingProneTime = 0; - bool IsProne { get { return remainingProneTime > 0; } } + bool IsProne { get { return !IsTraitDisabled && remainingProneTime > 0; } } bool IRenderInfantrySequenceModifier.IsModifyingSequence { get { return IsProne; } } string IRenderInfantrySequenceModifier.SequencePrefix { get { return info.ProneSequencePrefix; } }