From 6c1ca46d6e6b3b290ca867d4e790ef05f5638e4c Mon Sep 17 00:00:00 2001 From: orwell96 Date: Tue, 22 Jan 2019 12:43:11 +0100 Subject: [PATCH] Fix invalid path invalidation in ARS code --- advtrains_interlocking/ars.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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