aboutsummaryrefslogtreecommitdiff
path: root/advtrains_interlocking/ars.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2019-01-22 12:43:11 +0100
committerorwell96 <orwell@bleipb.de>2019-01-22 12:43:11 +0100
commit6c1ca46d6e6b3b290ca867d4e790ef05f5638e4c (patch)
treed068f624460326b157b2d8540920c8f1ec3c5037 /advtrains_interlocking/ars.lua
parentfab6cc11a88bcf99645fee36eb91e1a71314c5b4 (diff)
downloadadvtrains-6c1ca46d6e6b3b290ca867d4e790ef05f5638e4c.tar.gz
advtrains-6c1ca46d6e6b3b290ca867d4e790ef05f5638e4c.tar.bz2
advtrains-6c1ca46d6e6b3b290ca867d4e790ef05f5638e4c.zip
Fix invalid path invalidation in ARS code
Diffstat (limited to 'advtrains_interlocking/ars.lua')
-rw-r--r--advtrains_interlocking/ars.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/advtrains_interlocking/ars.lua b/advtrains_interlocking/ars.lua
index 7180ca6..e20d189 100644
--- a/advtrains_interlocking/ars.lua
+++ b/advtrains_interlocking/ars.lua
@@ -58,6 +58,8 @@ function advtrains.interlocking.ars_check(sigd, train)
local rteid = find_rtematch(tcbs.routes, train)
if rteid then
- il.route.update_route(sigd, tcbs, rteid, nil)
+ --delay routesetting, it should not occur inside train step
+ -- using after here is OK because that gets called on every path recalculation
+ minetest.after(0, il.route.update_route, sigd, tcbs, rteid, nil)
end
end