1
0
Fork 0

[walkover] fix warnings

This commit is contained in:
AFCMS 2021-05-25 00:55:14 +02:00
parent 0d13e1ffdd
commit 36f3c26139
1 changed files with 14 additions and 17 deletions

View File

@ -31,24 +31,21 @@ minetest.register_globalstep(function(dtime)
timer = timer + dtime; timer = timer + dtime;
if timer >= 0.3 then if timer >= 0.3 then
for _,player in pairs(get_connected_players()) do for _,player in pairs(get_connected_players()) do
local pp = player:get_pos() local pp = player:get_pos()
pp.y = ceil(pp.y) pp.y = ceil(pp.y)
local loc = vector_add(pp, {x=0,y=-1,z=0}) local loc = vector_add(pp, {x=0,y=-1,z=0})
if loc ~= nil then if loc ~= nil then
local nodeiamon = get_node(loc)
local nodeiamon = get_node(loc) if nodeiamon ~= nil then
if on_walk[nodeiamon.name] then
if nodeiamon ~= nil then on_walk[nodeiamon.name](loc, nodeiamon, player)
if on_walk[nodeiamon.name] then end
on_walk[nodeiamon.name](loc, nodeiamon, player) for i = 1, #registered_globals do
end
for i = 1, #registered_globals do
registered_globals[i](loc, nodeiamon, player) registered_globals[i](loc, nodeiamon, player)
end end
end end
end end
end end
timer = 0 timer = 0
end end
end) end)