Little change in detecting light damage
parent
9380fa4d2b
commit
07536c1f9a
2
api.lua
2
api.lua
|
@ -86,7 +86,7 @@ function mobs:register_mob(name, def)
|
|||
end
|
||||
|
||||
local do_env_damage = function(self)
|
||||
if self.light_damage and self.light_damage ~= 0 and minetest.env:get_timeofday() > 0.2 and minetest.env:get_timeofday() < 0.8 and minetest.env:get_node_light(self.object:getpos()) > 3 then
|
||||
if self.light_damage and self.light_damage ~= 0 and self.object:getpos().y>0 and minetest.env:get_node_light(self.object:getpos()) > 3 then
|
||||
self.object:punch(self.object, 1.0, {
|
||||
full_punch_interval=1.0,
|
||||
groupcaps={
|
||||
|
|
Loading…
Reference in New Issue