diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-11-21 14:56:03 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-11-29 19:13:50 +0200 |
commit | 0bf3a15886ec881e77d7753d02e9ac76e401bdd9 (patch) | |
tree | cfda3608b6f54e8fc9ed4a4db5f45e347f5d22a6 /data/mods | |
parent | cebc8c78a4f5c4a2d7bb246e44f7bd2599de9c9b (diff) | |
download | minetest-0bf3a15886ec881e77d7753d02e9ac76e401bdd9.tar.gz minetest-0bf3a15886ec881e77d7753d02e9ac76e401bdd9.tar.bz2 minetest-0bf3a15886ec881e77d7753d02e9ac76e401bdd9.zip |
Random Lua tweaks/fixes
Diffstat (limited to 'data/mods')
-rw-r--r-- | data/mods/default/init.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/data/mods/default/init.lua b/data/mods/default/init.lua index 4f825626d..b15315e24 100644 --- a/data/mods/default/init.lua +++ b/data/mods/default/init.lua @@ -715,12 +715,12 @@ function register_falling_node(nodename, texture) -- Set gravity self.object:setacceleration({x=0, y=-10, z=0}) -- Turn to actual sand when collides to ground or just move - pos = self.object:getpos() - bcp = {x=pos.x, y=pos.y-0.6, z=pos.z} -- Position of bottom center point - bcn = minetest.env:get_node(bcp) + local pos = self.object:getpos() + local bcp = {x=pos.x, y=pos.y-0.7, z=pos.z} -- Position of bottom center point + local bcn = minetest.env:get_node(bcp) if bcn.name ~= "air" then -- Turn to a sand node - np = {x=bcp.x, y=bcp.y+1, z=bcp.z} + local np = {x=bcp.x, y=bcp.y+1, z=bcp.z} minetest.env:add_node(np, {name=nodename}) self.object:remove() else |