mirror of
https://github.com/minetest-mods/digtron.git
synced 2024-07-04 14:55:15 +02:00
Fix deprecated minetest.env
calls (#86)
This commit is contained in:
parent
972b6919dc
commit
fc11dce128
4
util.lua
4
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
|
||||
|
Loading…
Reference in New Issue
Block a user