Skip to content

Instantly share code, notes, and snippets.

@PilzAdam
Created July 21, 2013 21:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PilzAdam/6050091 to your computer and use it in GitHub Desktop.
Save PilzAdam/6050091 to your computer and use it in GitHub Desktop.
diff --git a/builtin/falling.lua b/builtin/falling.lua
index 7308780..7bf29f1 100644
--- a/builtin/falling.lua
+++ b/builtin/falling.lua
@@ -156,7 +156,10 @@ function nodeupdate_single(p, delay)
minetest.after(0.1, nodeupdate_single, {x=p.x, y=p.y, z=p.z}, false)
else
minetest.remove_node(p)
- spawn_falling_node(p, n.name)
+ -- Spawn entity in next step to avoid lighting glitches
+ minetest.after(0, function(p, name)
+ spawn_falling_node(p, name)
+ end, p, n.name)
nodeupdate(p)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment