mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2025-02-26 09:33:49 +01:00
Round pos in spawnstruct chatcommand
This commit is contained in:
@ -463,10 +463,11 @@ minetest.register_chatcommand("spawnstruct", {
|
|||||||
description = S("Generate a pre-defined structure near your position."),
|
description = S("Generate a pre-defined structure near your position."),
|
||||||
privs = {debug = true},
|
privs = {debug = true},
|
||||||
func = function(name, param)
|
func = function(name, param)
|
||||||
local pos= minetest.get_player_by_name(name):get_pos()
|
local pos = minetest.get_player_by_name(name):get_pos()
|
||||||
if not pos then
|
if not pos then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
pos = vector.round(pos)
|
||||||
local errord = false
|
local errord = false
|
||||||
local message = S("Structure placed.")
|
local message = S("Structure placed.")
|
||||||
if param == "village" then
|
if param == "village" then
|
||||||
|
Reference in New Issue
Block a user