Remove unused code.

* Remove unused code that was commented out.  The code tried to find
  fire luaentities in the same spot as the newly created fire luaentity.
  It may have been intended to optimize getting set on fire multiple
  times, but it makes no sense as it does not discriminate between fire
  luaentities attached to the object set on fire and those attached to
  other objects.  The function that this code was in also has a better
  way to prevent adding multiple fire luaentities in the first place.
This commit is contained in:
kabou 2022-03-18 11:39:11 +01:00 committed by cora
parent 90311da514
commit 9eba0e4860

@ -131,19 +131,6 @@ function mcl_burning.set_on_fire(obj, burn_time)
if obj:is_player() then
mcl_burning.update_hud(obj)
end
--[[
-- FIXME: does this code make sense? It removes attached fire luaentities from
-- another object that happen to be at the same position.
local fire_luaentity = fire_entity:get_luaentity()
for _, other in pairs(minetest.get_objects_inside_radius(fire_entity:get_pos(), 0)) do
local other_luaentity = other:get_luaentity()
if other_luaentity and other_luaentity.name == "mcl_burning:fire" and other_luaentity ~= fire_luaentity then
other:remove()
break
end
end
]]--
end
function mcl_burning.extinguish(obj)