1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-06-28 14:16:06 +02:00

Update from Creative's repository

- For MinetestForFun/server-minetestforfun-creative#57
This commit is contained in:
LeMagnesium
2016-02-16 14:43:18 +01:00
parent c9a568f2ce
commit 8b02a31c12
107 changed files with 102 additions and 89 deletions

View File

@ -139,7 +139,6 @@ minetest.register_chatcommand("setwarp", {
description = "Set a warp location to the players location",
privs = { warp_admin = true },
func = function(name, param)
param = param:gsub("%W", "")
local h = "created"
for i = 1,table.getn(warps) do
if warps[i].name == param then
@ -150,6 +149,9 @@ minetest.register_chatcommand("setwarp", {
end
local player = minetest.get_player_by_name(name)
local pos = player:getpos()
if not pos then
return false, "Internal error while getting your position. Please try again later"
end
table.insert(warps, { name = param, x = pos.x, y = pos.y, z = pos.z, yaw = player:get_look_yaw(), pitch = player:get_look_pitch() })
save()
minetest.log("action", name .. " " .. h .. " warp \"" .. param .. "\": " .. pos.x .. ", " .. pos.y .. ", " .. pos.z)