From 0111f0d750276c9f25183b1523af5041a9991a27 Mon Sep 17 00:00:00 2001 From: DArcy Rush Date: Wed, 21 Oct 2015 10:54:01 +0100 Subject: [PATCH] Charge now using ticks and fixed extra bar time formula. ChargeTime has been changed to ChargeDelay and is measured in ticks rather than seconds. The formula for working out the extra bar time has been fixed to work properly at different charge delays. --- OpenRA.Mods.RA/Traits/PortableChrono.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OpenRA.Mods.RA/Traits/PortableChrono.cs b/OpenRA.Mods.RA/Traits/PortableChrono.cs index d25c5a1e13..e6babe13db 100644 --- a/OpenRA.Mods.RA/Traits/PortableChrono.cs +++ b/OpenRA.Mods.RA/Traits/PortableChrono.cs @@ -20,8 +20,8 @@ namespace OpenRA.Mods.RA.Traits { class PortableChronoInfo : ITraitInfo { - [Desc("Cooldown in seconds until the unit can teleport.")] - public readonly int ChargeTime = 20; + [Desc("Cooldown in ticks until the unit can teleport.")] + public readonly int ChargeDelay = 500; [Desc("Can the unit teleport only a certain distance?")] public readonly bool HasDistanceLimit = true; @@ -97,7 +97,7 @@ namespace OpenRA.Mods.RA.Traits public void ResetChargeTime() { - chargeTick = 25 * Info.ChargeTime; + chargeTick = Info.ChargeDelay; } public bool CanTeleport @@ -107,7 +107,7 @@ namespace OpenRA.Mods.RA.Traits public float GetValue() { - return (float)((chargeTick - (25 * Info.ChargeTime)) * (Info.ChargeTime * -0.0001)); + return (float)(Info.ChargeDelay - chargeTick) / Info.ChargeDelay; } public Color GetColor() { return Color.Magenta; }