aboutsummaryrefslogtreecommitdiff
path: root/advtrains_interlocking
diff options
context:
space:
mode:
Diffstat (limited to 'advtrains_interlocking')
-rw-r--r--advtrains_interlocking/routesetting.lua3
-rw-r--r--advtrains_interlocking/train_sections.lua1
2 files changed, 3 insertions, 1 deletions
diff --git a/advtrains_interlocking/routesetting.lua b/advtrains_interlocking/routesetting.lua
index 5d7357d..669a604 100644
--- a/advtrains_interlocking/routesetting.lua
+++ b/advtrains_interlocking/routesetting.lua
@@ -348,6 +348,8 @@ function ilrs.update_route(sigd, tcbs, newrte, cancel)
--atdebug("Signal not in control, held by",tcbs.signal_name)
return
end
+ -- clear route_rsn, it will be set again if needed
+ tcbs.route_rsn = nil
if (newrte and tcbs.routeset and tcbs.routeset ~= newrte) or cancel then
if tcbs.route_committed then
--atdebug("Cancelling:",tcbs.routeset)
@@ -359,7 +361,6 @@ function ilrs.update_route(sigd, tcbs, newrte, cancel)
has_changed_aspect = true
tcbs.routeset = nil
tcbs.route_auto = nil
- tcbs.route_rsn = nil
end
if newrte or tcbs.routeset then
if tcbs.route_committed then
diff --git a/advtrains_interlocking/train_sections.lua b/advtrains_interlocking/train_sections.lua
index 083676b..48e3342 100644
--- a/advtrains_interlocking/train_sections.lua
+++ b/advtrains_interlocking/train_sections.lua
@@ -101,6 +101,7 @@ local function setsection(tid, train, ts_id, ts, sigd)
tcbs.route_aspect = nil
tcbs.route_remote = nil
tcbs.route_origin = nil
+ tcbs.route_rsn = nil
if not tcbs.route_auto then
tcbs.routeset = nil
end