From 8145bf4926fbcd57320fca73900b58466007cdd4 Mon Sep 17 00:00:00 2001 From: Joachim Stolberg Date: Mon, 16 Apr 2018 19:13:16 +0200 Subject: [PATCH] setpos replaced by set_pos --- init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index e423c1d..ff14b30 100644 --- a/init.lua +++ b/init.lua @@ -163,7 +163,7 @@ local function control_player(pos, pos1, pos2, player_name) if correction == true then local last_pos = minetest.string_to_pos(meta:get_string("last_known_pos")) if last_pos then - player:setpos(last_pos) + player:set_pos(last_pos) end else -- store last known correct position meta:set_string("last_known_pos", minetest.pos_to_string(pl_pos)) @@ -194,7 +194,7 @@ local function place_hook(pos, dir, player, pos1, pos2) pos.y = pos.y - 1 pos.x = pos.x + dir.x pos.z = pos.z + dir.z - player:setpos(pos) + player:set_pos(pos) meta:set_string("last_known_pos", minetest.pos_to_string(pos)) -- control player every second minetest.after(1, control_player, switch_pos, pos1, pos2, player:get_player_name())