summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index c64be04..9c72ac1 100644
--- a/init.lua
+++ b/init.lua
@@ -59,6 +59,9 @@ minetest.register_chatcommand("/pos2", {
privs = {worldedit=true},
func = function(name, param)
local pos = minetest.env:get_player_by_name(name):getpos()
+ pos.x = math.floor(pos.x)
+ pos.y = math.floor(pos.y)
+ pos.z = math.floor(pos.z)
worldedit.pos2[name] = pos
worldedit.mark_pos2(name)
minetest.chat_send_player(name, "WorldEdit position 2 set to (" .. pos.x .. "," .. pos.y .. "," .. pos.z .. ")")