Increment actor generation on cloak.

This commit is contained in:
Paul Chote
2013-08-13 16:45:25 +12:00
parent 6f1f5e0ca0
commit e4d66b3d7a

View File

@@ -82,9 +82,12 @@ namespace OpenRA.Mods.RA
public void Tick(Actor self) public void Tick(Actor self)
{ {
if (remainingTime > 0 && canCloak) if (remainingTime > 0 && canCloak && --remainingTime <= 0)
if (--remainingTime <= 0) {
Sound.Play(info.CloakSound, self.CenterPosition); self.Generation++;
Sound.Play(info.CloakSound, self.CenterPosition);
}
if (self.IsDisabled()) if (self.IsDisabled())
Uncloak(); Uncloak();