From 7bbe0c2468262fa25990a5bbc92967f9fb924e61 Mon Sep 17 00:00:00 2001 From: orwell96 Date: Tue, 30 Oct 2018 16:19:37 +0100 Subject: Replace "Allow accelereting train towards signal" This is a better implementation of the same goal. The last commit caused trains to overrun the IP sometimes. Haven't noticed so far with this approach --- advtrains_interlocking/routesetting.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'advtrains_interlocking/routesetting.lua') diff --git a/advtrains_interlocking/routesetting.lua b/advtrains_interlocking/routesetting.lua index c6706f7..f13fcea 100644 --- a/advtrains_interlocking/routesetting.lua +++ b/advtrains_interlocking/routesetting.lua @@ -282,6 +282,9 @@ function ilrs.update_route(sigd, tcbs, newrte, cancel) tcbs.route_rsn = nil end if newrte or tcbs.routeset then + if tcbs.route_committed then + return + end if newrte then tcbs.routeset = newrte end --atdebug("Setting:",tcbs.routeset) local succ, rsn, cbts, cblk = ilrs.set_route(sigd, tcbs.routes[tcbs.routeset]) -- cgit v1.2.3