forked from MineClone5/MineClone5
[mcl_mobs] Fix server crash for mobs in unloaded areas, MineClone2/MineClone2#1703
This commit is contained in:
parent
9e095980c8
commit
9ae1119438
|
@ -938,10 +938,13 @@ mobs.mob_step = function(self, dtime)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.burn_timer == 0 and minetest_get_node_light(pos) > 12 and minetest_get_node_light(pos, 0.5) == 15 then
|
if self.burn_timer == 0 then
|
||||||
mcl_burning.set_on_fire(self.object, 1)
|
local light_current, light_day = minetest_get_node_light(pos), minetest_get_node_light(pos, 0.5)
|
||||||
self.burn_timer = 1 --1.7 seconds
|
if light_current and light_day and light_current > 12 and light_day == 15 then
|
||||||
self.pause_timer = 0.4
|
mcl_burning.set_on_fire(self.object, 1)
|
||||||
|
self.burn_timer = 1 --1.7 seconds
|
||||||
|
self.pause_timer = 0.4
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue