diff options
author | TenPlus1 <kinsellaja@yahoo.com> | 2017-07-08 21:24:30 +0100 |
---|---|---|
committer | TenPlus1 <kinsellaja@yahoo.com> | 2017-07-08 21:24:30 +0100 |
commit | 7b02fef7a5ff3542153cb0a03f5457560274693e (patch) | |
tree | f4eaf614c2e31698fe29526953213aaa7edd2437 /api.lua | |
parent | 7e092817603ecc4e0992fd009cd8d64c82952a80 (diff) |
explosions use tnt.boom() when TNT mod found, otherwise only entity damage
Diffstat (limited to 'api.lua')
-rw-r--r-- | api.lua | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -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 |