1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-11-18 16:20:38 +01:00

Remove .env calls in sethome

This commit is contained in:
LeMagnesium 2015-02-18 19:12:36 +01:00
parent b989218cdf
commit 6f2f57a913

View File

@ -10,7 +10,7 @@ home.GET_HOME_INTERVAL = 20*60
home.SET_HOME_INTERVAL = 20*60 home.SET_HOME_INTERVAL = 20*60
home.sethome = function(name) home.sethome = function(name)
local player = minetest.env:get_player_by_name(name) local player = minetest.get_player_by_name(name)
local pos = player:getpos() local pos = player:getpos()
local p_status = "real" local p_status = "real"
if pos.y < -19600 then if pos.y < -19600 then
@ -40,7 +40,7 @@ home.sethome = function(name)
end end
home.tohome = function(name) home.tohome = function(name)
local player = minetest.env:get_player_by_name(name) local player = minetest.get_player_by_name(name)
if player == nil then if player == nil then
-- just a check to prevent the server crashing -- just a check to prevent the server crashing
return false return false