diff options
author | orwell96 <orwell@bleipb.de> | 2018-10-30 16:19:37 +0100 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2018-10-30 16:19:37 +0100 |
commit | 7bbe0c2468262fa25990a5bbc92967f9fb924e61 (patch) | |
tree | 3085f9e2691a323d6bab422c9e0d29e406dffeab /advtrains_interlocking/routesetting.lua | |
parent | 06216b0ca189b95a2e8a8a3689562f819988539f (diff) | |
download | advtrains-7bbe0c2468262fa25990a5bbc92967f9fb924e61.tar.gz advtrains-7bbe0c2468262fa25990a5bbc92967f9fb924e61.tar.bz2 advtrains-7bbe0c2468262fa25990a5bbc92967f9fb924e61.zip |
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
Diffstat (limited to 'advtrains_interlocking/routesetting.lua')
-rw-r--r-- | advtrains_interlocking/routesetting.lua | 3 |
1 files changed, 3 insertions, 0 deletions
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]) |