diff options
author | TenPlus1 <kinsellaja@yahoo.com> | 2017-03-24 10:13:25 +0000 |
---|---|---|
committer | TenPlus1 <kinsellaja@yahoo.com> | 2017-03-24 10:13:25 +0000 |
commit | a37e38da6071146947e3d1ecc087725846bbd1b4 (patch) | |
tree | 797160af36ea044be7b817d9afc2e7fd5bf2e225 | |
parent | 374e7ac13bcc8484837d9ee59e4b3a00e3657173 (diff) |
Exploding mobs only drop items when killed, not when they explode
-rw-r--r-- | api.lua | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -1,5 +1,5 @@ --- Mobs Api (21st March 2017) +-- Mobs Api (24th March 2017) mobs = {} mobs.mod = "redo" @@ -1546,9 +1546,6 @@ local do_states = function(self, dtime) local pos = self.object:getpos() local radius = self.explosion_radius or 1 - -- hurt player/mobs caught in blast area - entity_physics(pos, radius) - -- dont damage anything if area protected or next to water if minetest.find_node_near(pos, 1, {"group:water"}) or minetest.is_protected(pos, "") then @@ -1559,6 +1556,9 @@ local do_states = function(self, dtime) effect(pos, 15, "tnt_smoke.png") + -- hurt player/mobs caught in blast area + entity_physics(pos, radius) + return end @@ -1568,6 +1568,8 @@ local do_states = function(self, dtime) self.object:remove() + entity_physics(pos, radius) + return end end |