summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Zhang <azhang9@gmail.com>2015-02-14 23:25:20 -0500
committerAnthony Zhang <azhang9@gmail.com>2015-02-14 23:25:20 -0500
commitb0fbcf197ffc0c635933294776e26ee50033440d (patch)
tree77d818a36ba76ed72f5553225cc66faa51405369
parentbb8456b71119ca6303b9e9706829a84dc7f81ab3 (diff)
parentb468e24a20b72ecf9ce5227457bdfa84b081812a (diff)
Merge pull request #72 from HybridDog/globalfix
fix an error message
-rw-r--r--worldedit_infinity/depends.txt1
-rw-r--r--worldedit_infinity/init.lua4
2 files changed, 3 insertions, 2 deletions
diff --git a/worldedit_infinity/depends.txt b/worldedit_infinity/depends.txt
new file mode 100644
index 0000000..c4f6871
--- /dev/null
+++ b/worldedit_infinity/depends.txt
@@ -0,0 +1 @@
+worldedit?
diff --git a/worldedit_infinity/init.lua b/worldedit_infinity/init.lua
index be79101..8bd3a05 100644
--- a/worldedit_infinity/init.lua
+++ b/worldedit_infinity/init.lua
@@ -1,4 +1,4 @@
-worldedit = worldedit or {}
+worldedit = rawget(_G, "worldedit") or {}
local minetest = minetest --local copy of global
local get_pointed = function(pos, nearest, distance)
@@ -100,4 +100,4 @@ worldedit.raytrace = function(pos, dir, callback)
intersectz = intersectz + componentz
end
end
-end \ No newline at end of file
+end