From 07ce4ceb5e8944248aaf54a6c466f2ba8fb65b6e Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Sun, 25 Jan 2015 20:11:04 +0100 Subject: [PATCH] Fixed /from_hell nether's command - Fixed crash when *pos* was called. --- nether/portal.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nether/portal.lua b/nether/portal.lua index 1e8c72f..96ee613 100644 --- a/nether/portal.lua +++ b/nether/portal.lua @@ -142,7 +142,13 @@ minetest.register_chatcommand("from_hell", { end minetest.chat_send_player(pname, "You are free now") player_from_nether(player) - player:moveto({x=pos.x, y=100, z=pos.z}) + local pos_togo = {x = 0, y = 35, z = -7} + if minetest.setting_getbool("static_spawnpoint") ~= nil then + local stsp_conf = minetest.setting_get("static_spawnpoint") + pos_togo = {x = stsp_conf:split(",")[1],y = stsp_conf:split(",")[2],z = stsp_conf:split(",")[3]} + end + table.foreach(pos_togo,print) + player:moveto(pos_togo) return true end })