aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorPilzAdam <pilzadam@minetest.net>2013-03-19 16:46:26 +0100
committerPilzAdam <pilzadam@minetest.net>2013-04-05 02:24:39 +0200
commit76b86c036876faabe49e274e9ada4fb9d8bd6aea (patch)
treeb5a98d4a2b0e5037e295540b1c78f37cfaec974c /builtin
parentc5a8448c41e4ea9d33a43cebef61425d4568a46d (diff)
downloadminetest-76b86c036876faabe49e274e9ada4fb9d8bd6aea.tar.gz
minetest-76b86c036876faabe49e274e9ada4fb9d8bd6aea.tar.bz2
minetest-76b86c036876faabe49e274e9ada4fb9d8bd6aea.zip
Add a delay to nodeupdate()
Diffstat (limited to 'builtin')
-rw-r--r--builtin/falling.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/builtin/falling.lua b/builtin/falling.lua
index 1c09f9856..5ae51e763 100644
--- a/builtin/falling.lua
+++ b/builtin/falling.lua
@@ -170,12 +170,14 @@ function nodeupdate(p)
p.x = math.floor(p.x+0.5)
p.y = math.floor(p.y+0.5)
p.z = math.floor(p.z+0.5)
+ nodeupdate_single(p)
for x = -1,1 do
for y = -1,1 do
for z = -1,1 do
- p2 = {x=p.x+x, y=p.y+y, z=p.z+z}
- nodeupdate_single(p2)
+ if not (x==0 and y==0 and z==0) then
+ minetest.after(0.1, nodeupdate_single, {x=p.x+x, y=p.y+y, z=p.z+z})
+ end
end
end
end