Made armor-regenaration disableable
This commit is contained in:
parent
94bbbbb104
commit
6bd4804acb
@ -75,16 +75,18 @@ namespace pdHealth
|
||||
}
|
||||
}
|
||||
|
||||
if (pl.Armor < armorVal) { timeUntilRegen = armorRegenDelay; }
|
||||
if (pl.Health < healthVal) { timeUntilRegen = armorRegenDelay; }
|
||||
|
||||
if (timeUntilRegen > 0) {
|
||||
timeUntilRegen = timeUntilRegen - tickTime;
|
||||
if (timeUntilRegen < 0) { timeUntilRegen = 0; }
|
||||
} else {
|
||||
if (pl.Armor < armorRegen) {
|
||||
pl.Armor = pl.Armor + armorRegenSpeed;
|
||||
if (pl.Armor > armorRegen) { pl.Armor = armorRegen; }
|
||||
if (armorRegen > 0) {
|
||||
if (pl.Armor < armorVal) { timeUntilRegen = armorRegenDelay; }
|
||||
if (pl.Health < healthVal) { timeUntilRegen = armorRegenDelay; }
|
||||
|
||||
if (timeUntilRegen > 0) {
|
||||
timeUntilRegen = timeUntilRegen - tickTime;
|
||||
if (timeUntilRegen < 0) { timeUntilRegen = 0; }
|
||||
} else {
|
||||
if (pl.Armor < armorRegen) {
|
||||
pl.Armor = pl.Armor + armorRegenSpeed;
|
||||
if (pl.Armor > armorRegen) { pl.Armor = armorRegen; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user