From ff313a388699d819fef7c562ec39d78edc6009e7 Mon Sep 17 00:00:00 2001 From: WolfGaming Date: Wed, 14 May 2014 22:49:08 +0000 Subject: [PATCH] Added UncloakOnAttack variable to Cloak --- OpenRA.Mods.RA/Cloak.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.RA/Cloak.cs b/OpenRA.Mods.RA/Cloak.cs index 2f5c3b25f3..f2d8f07095 100644 --- a/OpenRA.Mods.RA/Cloak.cs +++ b/OpenRA.Mods.RA/Cloak.cs @@ -21,6 +21,7 @@ namespace OpenRA.Mods.RA { public readonly int InitialDelay = 10; // Ticks public readonly int CloakDelay = 30; // Ticks + public readonly bool UncloakOnAttack = true; public readonly bool UncloakOnMove = false; public readonly bool UncloakOnUnload = false; public readonly bool RequiresCrate = false; @@ -63,7 +64,7 @@ namespace OpenRA.Mods.RA remainingTime = Math.Max(remainingTime, time); } - public void Attacking(Actor self, Target target, Armament a, Barrel barrel) { Uncloak(); } + public void Attacking(Actor self, Target target, Armament a, Barrel barrel) { if (Info.UncloakOnAttack) Uncloak(); } public bool Cloaked { get { return remainingTime <= 0; } }