From 7b02fef7a5ff3542153cb0a03f5457560274693e Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Sat, 8 Jul 2017 21:24:30 +0100 Subject: explosions use tnt.boom() when TNT mod found, otherwise only entity damage --- api.lua | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'api.lua') diff --git a/api.lua b/api.lua index ac7d5fe..a42b515 100644 --- a/api.lua +++ b/api.lua @@ -1694,10 +1694,15 @@ local do_states = function(self, dtime) self.object:remove() - tnt.boom(pos, { - radius = radius, - damage_radius = damage_radius, - }) + if minetest.get_modpath("tnt") then + + tnt.boom(pos, { + radius = radius, + damage_radius = damage_radius, + }) + else + entity_physics(pos, damage_radius) + end return end -- cgit v1.2.3