Under certain conditions the semaphores are not moving at semaphore-signals in OR (version 0.9.0.1648) . Whereas the lights showing the correct aspects the semaphores keep "quiet". This is the more interesting and not expected because the lights are beeing set at the same passage in the code of the sigcfg.dat where the semaphores beeing set.
The picture below shows the same semaphore-signal in the same route with the same sig-Files in MSTS compared to OR (the upper row shows the proper function in MSTS):
http://www.p-circle.de/elvastower/sema.jpg
After some detailed tests it seems to me that it is about the order of executing the scripts in the sigscr.dat. This order again depents to the order how the SignalSubObj are sorted in the sigcfg.dat at the SignalShape-tag.
The following code-part of the SignalSubObjs-tag in the sigcfg.dat is that one of the not moving semaphores in OR in the picture above (lower row).
... SignalSubObjs ( 3 SignalSubObj ( 0 "HEAD1" "SEMAPHORE 1" SigSubType ( SIGNAL_HEAD ) SigSubSType ( "Sig25EHp_F1" ) ) SignalSubObj ( 1 "HEAD2" "SEMAPHORE 2" SigSubType ( SIGNAL_HEAD ) SigSubSType ( "Sig25EHp_F2" ) ) SignalSubObj ( 2 "SIGNAL" "Hp2 40 km/h" SigSubType ( SIGNAL_HEAD ) SignalFlags ( OPTIONAL JN_LINK DEFAULT ) SigSubSType ( "Sig25EHp_F2_40" ) ) ) ...
If I change the order of the tags (and re-number it!) like the following code the semaphores will move correct. (After that change it is of course required to rebuild the signal in the RouteEditor.)
... SignalSubObjs ( 3 SignalSubObj ( 0 "SIGNAL" "Hp2 40 km/h" SigSubType ( SIGNAL_HEAD ) SignalFlags ( OPTIONAL JN_LINK DEFAULT ) SigSubSType ( "Sig25EHp_F2_40" ) ) SignalSubObj ( 1 "HEAD1" "SEMAPHORE 1" SigSubType ( SIGNAL_HEAD ) SigSubSType ( "Sig25EHp_F1" ) ) SignalSubObj ( 2 "HEAD2" "SEMAPHORE 2" SigSubType ( SIGNAL_HEAD ) SigSubSType ( "Sig25EHp_F2" ) ) ) ...
But such changes in the sig-files of finished routes implicates other changes i.e. in the tdb.dat and will force you finally to rebuild all the signals with its links to the tracks again.
A compatibility to MSTS would therefor be desirable in view of this sorting-problem. Remember, the lights working fine by now in OR and are set by the same code-parts of the sigcfg.dat. The script-executing-order seems only important for the semaphores and keep them unmoved. Hopefully it is not that sophisticated to solve it.
A hint maybe that OR fires a warning when the order is another than the numbers: "...Invalid SignalSubObj index; expected 0, got 1..." (line 646 in ORs SIGCFGFiles.cs). In MSTS you can "shake" the tags to every order you want. It are only the numbers (indexes) which are important for MSTS.
Greetings
(Sorry for that white background color at the code snippets. I have not found how to change it.)
This post has been edited by jonas: 07 April 2014 - 05:52 PM