forked from MineClone5/MineClone5
Fix mobs despawning while close to player
This commit is contained in:
parent
0fe1707c2f
commit
9e97331bdc
|
@ -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
|
||||
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
|
||||
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
|
||||
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 New Issue