From e4d66b3d7aa07de78f8c6234686a170d6b321bc2 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Tue, 13 Aug 2013 16:45:25 +1200 Subject: [PATCH] Increment actor generation on cloak. --- OpenRA.Mods.RA/Cloak.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/OpenRA.Mods.RA/Cloak.cs b/OpenRA.Mods.RA/Cloak.cs index e2dc8ccc3d..95554b00ff 100644 --- a/OpenRA.Mods.RA/Cloak.cs +++ b/OpenRA.Mods.RA/Cloak.cs @@ -82,9 +82,12 @@ namespace OpenRA.Mods.RA public void Tick(Actor self) { - if (remainingTime > 0 && canCloak) - if (--remainingTime <= 0) - Sound.Play(info.CloakSound, self.CenterPosition); + if (remainingTime > 0 && canCloak && --remainingTime <= 0) + { + self.Generation++; + Sound.Play(info.CloakSound, self.CenterPosition); + } + if (self.IsDisabled()) Uncloak();