diff --git a/mods/tnt/init.lua b/mods/tnt/init.lua index c76137b..06df04a 100644 --- a/mods/tnt/init.lua +++ b/mods/tnt/init.lua @@ -157,6 +157,7 @@ local function entity_physics(pos, radius, drops) local objs = minetest.get_objects_inside_radius(pos, radius) for _, obj in pairs(objs) do local obj_pos = obj:get_pos() + if obj_pos then local dist = math.max(1, vector.distance(pos, obj_pos)) local damage = (4 / dist) * radius @@ -202,6 +203,7 @@ local function entity_physics(pos, radius, drops) end end end + end end end