1
0
Fork 0

Fix mobs despawning while close to player

This commit is contained in:
Lizzy Fleckenstein 2021-01-03 15:10:50 +01:00
parent 0fe1707c2f
commit 9e97331bdc
1 changed files with 15 additions and 15 deletions

View File

@ -3598,15 +3598,15 @@ local mob_step = function(self, dtime)
for n = 1, #close_objs do
if close_objs[n]:is_player() then
self.lifetimer = 20
else
if math.random(1,10) <= 3 then
return
end
end
if math.random(1, 10) <= 3 then
minetest.log("action", "Mob "..self.name.." despawns in mob_step at "..minetest.pos_to_string(pos))
mcl_burning.extinguish(self.object)
self.object:remove()
return
end
end
end
else
minetest.log("action", "Mob "..self.name.." despawns in mob_step at "..minetest.pos_to_string(pos))
mcl_burning.extinguish(self.object)