Fix drowning mob not getting removed

This commit is contained in:
Wuzzy 2019-09-04 17:35:43 +02:00
parent df549c378d
commit 5898f8cab5
1 changed files with 2 additions and 0 deletions

View File

@ -46,6 +46,7 @@ local function effect(pos, amount, texture, max_size)
})
end
-- Handle death (does not remove mob)
local function die_handler(self, killer)
local pos = self.object:get_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
else
die_handler(self, hitter)
self.object:remove()
return true
end
end