coil
2019-07-10 dc4f4f66e612850d78d9a28808ef19704cf3325a
Apply radiation damage only if entity is not dead (#504)

This prevents on_dieplayer being called unnecessarily, causing problems such as repeated death messages.
1 files modified
2 ■■■ changed files
technic/radiation.lua 2 ●●● patch | view | raw | blame | history
technic/radiation.lua
@@ -338,7 +338,7 @@
    local max_dist = strength * rad_dmg_mult_sqrt
    for _, o in pairs(minetest.get_objects_inside_radius(pos,
            max_dist + abdomen_offset)) do
        if entity_damage or o:is_player() then
        if (entity_damage or o:is_player()) and o:get_hp() > 0 then
            dmg_object(pos, o, strength)
        end
    end