Attempt to fix crash

This commit is contained in:
philipmi 2022-11-28 19:40:57 +01:00
parent 41ff3a0a8d
commit 95a6b0dd48

View file

@ -375,8 +375,21 @@ local function place_map(map)
end
end)
minetest.after(10, function()
minetest.fix_light(ctf_map.map.pos1, ctf_map.map.pos2)
minetest.after(1, function()
for _, object_drop in pairs(minetest.get_objects_in_area(map.pos1, map.pos2)) do
if not object_drop:is_player() then
local drop = object_drop:get_luaentity()
if drop and drop.name == "__builtin:item" then
object_drop:remove()
end
end
end
minetest.after(1, function()
minetest.fix_light(map.pos1, map.pos2)
end)
end)
end, nil)
end
@ -387,7 +400,6 @@ function ctf_map.register_on_map_loaded(func)
end
ctf_match.register_on_new_match(function()
minetest.clear_objects({ mode = "quick" })
-- Select map
local idx = select_map()