1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-02-03 13:12:11 +02:00

fix for RPG deleting unit from HP pool before granting XP for more HP

This commit is contained in:
hanakocz 2020-07-24 15:10:20 +02:00
parent f6aaecdf36
commit 5b6b1d48b5

View File

@ -1936,8 +1936,9 @@ local function on_entity_damaged(event)
event.entity.health = health_pool[1] * health_pool[2]
if health_pool[1] <= 0 then
global.biter_health_boost_units[event.entity.unit_number] = nil
local entity_number = event.entity.unit_number
event.entity.die(event.entity.force.name, event.cause)
global.biter_health_boost_units[entity_number] = nil
end
return
end