mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-26 03:07:32 +01:00
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
Block a user