Clear tcbs.route_rsn when a route is set
This appears to fix the issue where route_rsn is not cleared and later shown on the train HUD even when the route is set. Note that this only works if the route is (successfully) set after this patch is applied - it does not clear route_rsn for routes that are already set. How to test: * Set a conflicting route for the train. * Set a route for the train. Note that a message appears on the train HUD explaining that the route cannot be set (this is also the current behavior without the patch). * Cancel the conflicting route. Note that the message on the train HUD is cleared.
This commit is contained in:
parent
fcfe21f197
commit
dd883c5b5e
|
@ -113,6 +113,7 @@ function ilrs.set_route(signal, route, try)
|
|||
if c_tcbs.signal then
|
||||
c_tcbs.route_committed = true
|
||||
c_tcbs.aspect = route.aspect or advtrains.interlocking.GENERIC_FREE
|
||||
c_tcbs.route_rsn = nil
|
||||
c_tcbs.route_origin = signal
|
||||
advtrains.interlocking.update_signal_aspect(c_tcbs)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue