From c310e1775482834930dcf53ef0d8b2b603e0abff Mon Sep 17 00:00:00 2001 From: Fierelier Date: Mon, 21 May 2018 13:03:49 +0200 Subject: [PATCH] Renaming "timeUntilRegen" to "timeUntilArmorRegen" Getting ready for health regen implementation. --- scripts/paydayHealth.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/paydayHealth.cs b/scripts/paydayHealth.cs index ad3b9dc..7fde5a2 100644 --- a/scripts/paydayHealth.cs +++ b/scripts/paydayHealth.cs @@ -18,7 +18,7 @@ namespace pdHealth //SETTINGS //Regeneration int armorRegen = 25; //How far to regenerate the armor. Set to 0 to disable regenaration entirely. - float armorRegenSpeed = 5f; //How much armor to regenerate per second. + float armorRegenSpeed = 10f; //How much armor to regenerate per second. float armorRegenDelay = 5f; //Delay after damage before recharging armor. Set to 0 to disable delay. //Max Armor/Health @@ -32,7 +32,7 @@ namespace pdHealth //VARIABLES (DO NOT TOUCH) int armorVal = -1; int healthVal = -1; - float timeUntilRegen = 0.0f; + float timeUntiArmorlRegen = 0.0f; float armorDecimalRegen = 0.0f; private void doHealthTick(object sender, EventArgs e) @@ -52,7 +52,7 @@ namespace pdHealth if (pl.isAlive == false) { armorVal = -1; healthVal = -1; - timeUntilRegen = 0.0f; + timeUntiArmorlRegen = 0.0f; armorDecimalRegen = 0.0f; return; } @@ -77,12 +77,12 @@ namespace pdHealth } if (armorRegen > 0) { - if (pl.Armor < armorVal) { armorDecimalRegen = 0.0f; timeUntilRegen = armorRegenDelay; } - if (pl.Health < healthVal) { armorDecimalRegen = 0.0f; timeUntilRegen = armorRegenDelay; } + if (pl.Armor < armorVal) { armorDecimalRegen = 0.0f; timeUntiArmorlRegen = armorRegenDelay; } + if (pl.Health < healthVal) { armorDecimalRegen = 0.0f; timeUntiArmorlRegen = armorRegenDelay; } - if (timeUntilRegen > 0) { - timeUntilRegen = timeUntilRegen - ((1000.0f/GTA.Game.FPS)/1000.0f); - if (timeUntilRegen < 0) { timeUntilRegen = 0; } + if (timeUntiArmorlRegen > 0) { + timeUntiArmorlRegen = timeUntiArmorlRegen - ((1000.0f/GTA.Game.FPS)/1000.0f); + if (timeUntiArmorlRegen < 0) { timeUntiArmorlRegen = 0; } } else { if (pl.Armor < armorRegen) { armorDecimalRegen = armorDecimalRegen + (((1000.0f/GTA.Game.FPS)*armorRegenSpeed)/1000.0f);