aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2019-01-22 00:18:24 +0100
committerorwell96 <orwell@bleipb.de>2019-01-22 00:18:24 +0100
commitadc8db22fb35e7d18dd20b73478c241b6fed7de0 (patch)
tree12e66cbcf770630cf9a7e954b287dbcf730b33fe
parent5f290819cdb78303396f9f89907ebbc66a9d74b3 (diff)
downloadadvtrains-adc8db22fb35e7d18dd20b73478c241b6fed7de0.tar.gz
advtrains-adc8db22fb35e7d18dd20b73478c241b6fed7de0.tar.bz2
advtrains-adc8db22fb35e7d18dd20b73478c241b6fed7de0.zip
Fix for path invalidation within update callbacks (issue was caused by detector rails)
-rw-r--r--advtrains/nodedb.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/advtrains/nodedb.lua b/advtrains/nodedb.lua
index 9513740..d38a9d8 100644
--- a/advtrains/nodedb.lua
+++ b/advtrains/nodedb.lua
@@ -156,7 +156,7 @@ function ndb.update(pos, pnode)
local resid = (nid * 4) + (l2b(node.param2 or 0))
ndbset(pos.x, pos.y, pos.z, resid )
--atdebug("nodedb: updating node", pos, "stored nid",nid,"assigned",ndb_nodeids[nid],"resulting cid",resid)
- advtrains.invalidate_all_paths(pos)
+ minetest.after(0, advtrains.invalidate_all_paths, pos)
else
--at this position there is no longer a node that needs to be tracked.
--atdebug("nodedb: updating node", pos, "cleared")