added spawnpoint on nav:map and disabled hunger logging

This commit is contained in:
kaadmy 2015-12-03 10:59:45 -08:00
parent 866ee72220
commit 5bda98a03e
2 changed files with 10 additions and 1 deletions

View File

@ -44,7 +44,7 @@ local function load_hunger()
hunger.hunger[name] = hnger
hunger.saturation[name] = sat
minetest.log("action", name.." has "..hnger.." hunger and is saturated to "..sat.."%")
-- minetest.log("action", name.." has "..hnger.." hunger and is saturated to "..sat.."%")
until input:read(0) == nil
io.close(input)
else

View File

@ -97,6 +97,15 @@ local function recieve_fields(player, form_name, fields)
end
end
if not (minetest.is_singleplayer() or not minetest.setting_get_pos("static_spawnpoint")) then
minetest.after(
1.0,
function()
nav.add_waypoint(minetest.setting_get_pos("static_spawnpoint"),
"spawn", "Spawn", true, "spawn")
end)
end
local function on_joinplayer(player)
local name = player:get_player_name()