From: Rui Date: Sat, 5 Nov 2016 02:17:05 +0000 (+0900) Subject: sethome.get: Copy a return value X-Git-Tag: 0.4.15~54 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=631f7f46c758721945dbb201bb7f4c84f21ee863;p=oweals%2Fminetest_game.git sethome.get: Copy a return value --- diff --git a/mods/sethome/init.lua b/mods/sethome/init.lua index 4246f7a5..28bfcef6 100644 --- a/mods/sethome/init.lua +++ b/mods/sethome/init.lua @@ -41,7 +41,12 @@ sethome.set = function(name, pos) end sethome.get = function(name) - return homepos[name] + local pos = homepos[name] + if pos then + return vector.new(pos) + else + return nil + end end sethome.go = function(name)