Properly floor the player coordinates.

This commit is contained in:
Anthony Zhang 2012-07-16 16:21:55 -04:00
parent 0606a910e2
commit 2c2d7fdec1
1 changed files with 3 additions and 0 deletions

View File

@ -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 .. ")")