mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-26 12:31:05 +01:00
Fix mobs despawning while close to player
This commit is contained in:
parent
0fe1707c2f
commit
9e97331bdc
1 changed files with 15 additions and 15 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue