summaryrefslogtreecommitdiff
path: root/builtin/game/falling.lua
diff options
context:
space:
mode:
authorCraig Davison <craig.davison3@gmail.com>2014-11-26 22:48:43 +1000
committerCraig Robbins <kde.psych@gmail.com>2014-11-26 22:50:08 +1000
commitdbae8a88545e52f4a7e84a18c760530388ad8c46 (patch)
tree9ffcf528fdd0440455b532cf643e70d2a3bf4580 /builtin/game/falling.lua
parent8df8554fceeb2eec2103c0222c0a45124e1de7cc (diff)
downloadminetest-dbae8a88545e52f4a7e84a18c760530388ad8c46.tar.gz
minetest-dbae8a88545e52f4a7e84a18c760530388ad8c46.tar.bz2
minetest-dbae8a88545e52f4a7e84a18c760530388ad8c46.zip
Fix some undeclared global variables
Diffstat (limited to 'builtin/game/falling.lua')
-rw-r--r--builtin/game/falling.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/builtin/game/falling.lua b/builtin/game/falling.lua
index 0e45a4375..58f68fc56 100644
--- a/builtin/game/falling.lua
+++ b/builtin/game/falling.lua
@@ -30,7 +30,7 @@ core.register_entity(":__builtin:falling_node", {
item_texture = core.registered_items[itemname].inventory_image
item_type = core.registered_items[itemname].type
end
- prop = {
+ local prop = {
is_visible = true,
textures = {node.name},
}
@@ -112,7 +112,7 @@ core.register_entity(":__builtin:falling_node", {
})
function spawn_falling_node(p, node)
- obj = core.add_entity(p, "__builtin:falling_node")
+ local obj = core.add_entity(p, "__builtin:falling_node")
obj:get_luaentity():set_node(node)
end
@@ -163,10 +163,10 @@ end
--
function nodeupdate_single(p, delay)
- n = core.get_node(p)
+ local n = core.get_node(p)
if core.get_item_group(n.name, "falling_node") ~= 0 then
- p_bottom = {x=p.x, y=p.y-1, z=p.z}
- n_bottom = core.get_node(p_bottom)
+ local p_bottom = {x=p.x, y=p.y-1, z=p.z}
+ local n_bottom = core.get_node(p_bottom)
-- Note: walkable is in the node definition, not in item groups
if core.registered_nodes[n_bottom.name] and
(core.get_item_group(n.name, "float") == 0 or