mirror of
https://github.com/Uberi/Minetest-WorldEdit.git
synced 2025-01-20 19:41:31 +01:00
Properly floor the player coordinates.
This commit is contained in:
parent
0606a910e2
commit
2c2d7fdec1
3
init.lua
3
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 .. ")")
|
||||
|
Loading…
Reference in New Issue
Block a user