From 43f02ba6ddaa0f15bca35a14f833cc3cdee395d3 Mon Sep 17 00:00:00 2001 From: 1F616EMO Date: Wed, 3 Jul 2024 07:08:29 +0800 Subject: [PATCH] Round player position --- pos.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pos.lua b/pos.lua index e6e9d35..0026869 100644 --- a/pos.lua +++ b/pos.lua @@ -49,7 +49,7 @@ minetest.register_chatcommand("area_pos1", { local pos local player = minetest.get_player_by_name(name) if player then - pos = player:get_pos() + pos = vector.round(player:get_pos()) end local found, _, x_str, y_str, z_str = param:find( "^(~?-?%d*)[, ](~?-?%d*)[, ](~?-?%d*)$") @@ -84,7 +84,7 @@ minetest.register_chatcommand("area_pos2", { local pos local player = minetest.get_player_by_name(name) if player then - pos = player:get_pos() + pos = vector.round(player:get_pos()) end local found, _, x_str, y_str, z_str = param:find( "^(~?-?%d*)[, ](~?-?%d*)[, ](~?-?%d*)$")