From ab53bbc594dee9c66a837ad670d3205f0822c7a2 Mon Sep 17 00:00:00 2001 From: Robbie Ferguson Date: Tue, 10 May 2016 15:17:01 -0400 Subject: [PATCH] First working commit. Thanks to DonBatman and NathanS21 for helping as testers. --- init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 0da528f..ddad85f 100644 --- a/init.lua +++ b/init.lua @@ -88,7 +88,7 @@ local function tpc_send(player,coordinates) -- If the area is protected, reject the user's request to teleport to these coordinates -- In future release we'll actually query the player who owns the area, if they're online, and ask for their permission. - local protected = minetest.is_protected(target_coords) + local protected = minetest.is_protected(target_coords,pname) if protected then minetest.chat_send_player(player, "Error: These coordinates are within a protected area.") return @@ -96,7 +96,7 @@ local function tpc_send(player,coordinates) minetest.chat_send_player(player, 'Teleporting to '..posx..','..posy..','..posz) minetest.sound_play("tps_portal", {pos = target_coords, gain = 1.0, max_hear_distance = 10}) - pname:setpos(find_free_position_near(target_coords)) + pname:setpos(target_coords) end local function tpr_deny(name)