add nil check to flight potion (hardening)
This commit is contained in:
parent
0475a397a2
commit
95b394ffc5
@ -60,7 +60,7 @@ end
|
|||||||
-- after function
|
-- after function
|
||||||
local function ethereal_set_flight(user)
|
local function ethereal_set_flight(user)
|
||||||
|
|
||||||
if not user then return end
|
local name = user and user:get_player_name() ; if not name then return end
|
||||||
|
|
||||||
local timer = tonumber(get_timer(user)) or 0
|
local timer = tonumber(get_timer(user)) or 0
|
||||||
|
|
||||||
@ -72,7 +72,6 @@ local function ethereal_set_flight(user)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local name = user:get_player_name()
|
|
||||||
local privs = minetest.get_player_privs(name)
|
local privs = minetest.get_player_privs(name)
|
||||||
|
|
||||||
-- have we already applied 'fly' privelage?
|
-- have we already applied 'fly' privelage?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user