mirror of
https://codeberg.org/tenplus1/mobs_redo.git
synced 2024-12-24 01:30:22 +01:00
Exploding mobs only drop items when killed, not when they explode
This commit is contained in:
parent
374e7ac13b
commit
a37e38da60
10
api.lua
10
api.lua
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user