From a6a1c1aabce8410d2b7f03898411b897068ce661 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Wed, 19 May 2010 18:40:38 +1200 Subject: [PATCH] if we've been forced to decloak, don't cut it short with another decloak --- OpenRA.Game/Traits/Submarine.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenRA.Game/Traits/Submarine.cs b/OpenRA.Game/Traits/Submarine.cs index 7dfcbcf95e..c9cb9528bb 100644 --- a/OpenRA.Game/Traits/Submarine.cs +++ b/OpenRA.Game/Traits/Submarine.cs @@ -20,6 +20,7 @@ using System.Collections.Generic; using System.Linq; +using System; namespace OpenRA.Traits { @@ -49,7 +50,7 @@ namespace OpenRA.Traits if (remainingTime <= 0) OnSurface(); - remainingTime = (int)(self.Info.Traits.Get().CloakDelay * 25); + remainingTime = Math.Max(remainingTime, (int)(self.Info.Traits.Get().CloakDelay * 25)); } public void Attacking(Actor self) { DoSurface(); }