From fc11dce128603a99b04f6a7236f361fa9b9b5781 Mon Sep 17 00:00:00 2001 From: Buckaroo Banzai <39065740+BuckarooBanzay@users.noreply.github.com> Date: Tue, 21 Feb 2023 20:41:49 +0100 Subject: [PATCH] Fix deprecated `minetest.env` calls (#86) --- util.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util.lua b/util.lua index 25e87da..2ce2492 100644 --- a/util.lua +++ b/util.lua @@ -312,7 +312,7 @@ digtron.damage_creatures = function(player, source_pos, target_pos, amount, item if type(player) ~= 'userdata' then return end - local objects = minetest.env:get_objects_inside_radius(target_pos, 1.0) + local objects = minetest.get_objects_inside_radius(target_pos, 1.0) if objects ~= nil then damage_def.damage_groups.fleshy = amount local velocity = { @@ -352,7 +352,7 @@ digtron.damage_creatures = function(player, source_pos, target_pos, amount, item end end -- If we killed any mobs they might have dropped some stuff, vacuum that up now too. - objects = minetest.env:get_objects_inside_radius(target_pos, 1.0) + objects = minetest.get_objects_inside_radius(target_pos, 1.0) if objects ~= nil then for _, obj in ipairs(objects) do if not obj:is_player() then