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; }