From f4c5a315a654145becfd7a7d329c36ddb6a5bcaa Mon Sep 17 00:00:00 2001 From: MewMew Date: Sat, 4 Apr 2020 09:02:09 +0200 Subject: [PATCH] broken module fix --- modules/biter_health_booster.lua | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/biter_health_booster.lua b/modules/biter_health_booster.lua index 44dfc2df..15498157 100644 --- a/modules/biter_health_booster.lua +++ b/modules/biter_health_booster.lua @@ -72,7 +72,6 @@ local function on_entity_damaged(event) local biter = event.entity if not (biter and biter.valid) then return end if biter.type ~= "unit" then return end - if event.final_damage_amount == 0 then return end local biter_health_boost_units = global.biter_health_boost_units @@ -98,12 +97,9 @@ local function on_entity_damaged(event) end end - --Calculate current actual health, accounting for regeneration - local current_health = biter.health * (1 / health_pool[2]) - --Reduce health pool - health_pool[1] = current_health - event.final_damage_amount - + health_pool[1] = health_pool[1] - event.final_damage_amount + --Set entity health relative to health pool biter.health = health_pool[1] * health_pool[2]