From 83daeec0ae9d64872594032530fb385cb796653d Mon Sep 17 00:00:00 2001 From: Fierelier Date: Tue, 15 May 2018 10:00:56 +0200 Subject: [PATCH] Moved timeUntilRegen reset-checks --- paydayHealth.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/paydayHealth.cs b/paydayHealth.cs index e460a18..e3b44e1 100644 --- a/paydayHealth.cs +++ b/paydayHealth.cs @@ -55,9 +55,6 @@ namespace pdHealth return; } - if (pl.Armor < armorVal) { timeUntilRegen = armorRegenDelay; } - if (pl.Health < healthVal) { timeUntilRegen = armorRegenDelay; } - if (allDamageArmor == true) { if (pl.Health < healthVal) { int damageTaken = healthVal - pl.Health; @@ -76,6 +73,10 @@ namespace pdHealth pl.Health = (int)Math.Round(pl.Health - ((armorVal - pl.Armor)*1.0f-armorDefense)); } } + + if (pl.Armor < armorVal) { timeUntilRegen = armorRegenDelay; } + if (pl.Health < healthVal) { timeUntilRegen = armorRegenDelay; } + if (timeUntilRegen > 0) { timeUntilRegen = timeUntilRegen - tickTime; if (timeUntilRegen < 0) { timeUntilRegen = 0; }