Fix drowning mob not getting removed
This commit is contained in:
parent
df549c378d
commit
5898f8cab5
@ -46,6 +46,7 @@ local function effect(pos, amount, texture, max_size)
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Handle death (does not remove mob)
|
||||||
local function die_handler(self, killer)
|
local function die_handler(self, killer)
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
minetest.log("action", "[mobs] "..self.name.." dies at "..minetest.pos_to_string(vector.round(pos)))
|
minetest.log("action", "[mobs] "..self.name.." dies at "..minetest.pos_to_string(vector.round(pos)))
|
||||||
@ -100,6 +101,7 @@ local function check_for_death(self, hitter)
|
|||||||
return false
|
return false
|
||||||
else
|
else
|
||||||
die_handler(self, hitter)
|
die_handler(self, hitter)
|
||||||
|
self.object:remove()
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user