Trying to use approach control for a Level Crossing signal, a route creator noticed that approach_control_position_forced was clearing LX signals when the train was far away from them.
I saw that approach control takes into account distance between train and its next signal. This is correct for non forced version of approach control, but in the forced function, the signal is cleared miles away from the train.
For testing, I modified the function to search in train's path until the control distance is passed or the signal is found, and seems to work. However, this might need some tuning to avoid searching for signals in every update cycle.
I don't know if this is the expected behaviour for this function. If it is not, I don't mind trying to fix it.
Regards,
César
Page 1 of 1
Forced approach position control clears far from the signal
#3
Posted 17 April 2020 - 11:21 AM
I attach a diff with a fix for this issue. With this modification approach control also works in explorer mode. However, it doesn't work in multiplayer clients (I assume MP server has ValidRoute only for its own trains). I hope the changes won't break anything.
Regards,
César
Regards,
César
Attached File(s)
-
approach_control.txt (4.07K)
Number of downloads: 227
#4
Posted 17 April 2020 - 11:17 PM
The feature seems to work well with the fix, which I have introduced in Rev. 58.1 of OR NewYear MG.
Page 1 of 1