nil check in flight

This commit is contained in:
tenplus1 2021-02-10 14:45:35 +00:00
parent ddd2d19275
commit a1c4e3cc95

View File

@ -61,7 +61,7 @@ minetest.register_on_joinplayer(function(player)
if privs.fly then
local timer = tonumber(meta:get_string("ethereal:fly_timer"))
local timer = tonumber(meta:get_string("ethereal:fly_timer")) or 0
if timer <= 0 then
set_flight(player, nil)