Signal lights "moving out"

Use this forum if you found a bug.
User avatar
Goku
Site Admin
Posts: 363
Joined: 15 Jan 2019, 18:10
Location: Poland
Contact:
Thank you for this file.
I think that the problem is here:
Position ( -4951 14652 840.6770 1.0000 791.2520 )

Maybe the signals are linked between .rtsdb and .tdb only by signal position and the position must match perfectly.
But TSRE uses different number format than MSRE, so if you save MSRE route in TSRE, the position values in TDB file change.
TrItemRData ( -790.96503 201.037 -615.05896 -5248 14846 )
TSRE saves more numbers after "." than MSRE.
But if this is the case, then the bug should appear only once. When you first edit route in TSRE. After regenerating rts file, it should work fine in the future.

I don't know why RTS developers didn't use "TrItemId" arrtibute for data linking.

---

I think that best solution would be to make TSRE support for this rtsdb file, but I need some answers:
Position ( -4951 14652 -144.7790 1.0000 1004.2600 ) <- is it position from .W file or .TDB file?
NumSigItems ( 1 ) <- is it just number of enabled SignalUnits?
Name ( "М5") <- is it the name you see displayed above the signal?
UnitFlags ( 00000000 ) <- what flags can be there? I see three values in your file. "0", "1" and "4".
DefaultAspect ( STOP ) <- I see it is always stop in your file.

Archimage wrote: 19 Feb 2020, 19:29P.S: some of RTS fans told me that you have some polish umlauts in the code of TSRE and its not good and should be fixed cause uncommon signs...
Yes, I know. Some parts of TSRE are 10 years old and I didn't know any other language than polish :)
But I don't see any reason why it could cause problems.

Archimage
Posts: 118
Joined: 19 Feb 2019, 12:17
Goku wrote: 19 Feb 2020, 19:50 I think that best solution would be to make TSRE support for this rtsdb file, but I need some answers:
Position ( -4951 14652 -144.7790 1.0000 1004.2600 ) <- is it position from .W file or .TDB file?
NumSigItems ( 1 ) <- is it just number of enabled SignalUnits?
Name ( "М5") <- is it the name you see displayed above the signal?
UnitFlags ( 00000000 ) <- what flags can be there? I see three values in your file. "0", "1" and "4".
DefaultAspect ( STOP ) <- I see it is always stop in your file.

P.S: some of RTS fans told me that you have some polish umlauts in the code of TSRE and its not good and should be fixed cause uncommon signs...
Yes, I know. Some parts of TSRE are 10 years old and I didn't know any other language than polish :)
But I don't see any reason why it could cause problems.
1) I was told that RTS Dispatcher works only with .TDB file so i think the position is from .TDB too.
2) I think yes. Its just a number of SignalUnits.
3) Yes. That name is written manually for every signal using RTS Dispatcher.
4) Dont know about Flags. But i was told that EVERY line of the file except "Name" is generated automatically using RTS Dispatcher (and think just taken from .TDB) and only Name is written manually.
5) It's the default state of the signal. In my file i see not only "STOP" but few "STOP_AND_PROCEED" too. Think it is also taken from .TDB .

Guys told me that using "uncommon symbols" like umlauts can cause bugs and not proper work of parts of the source.

Archimage
Posts: 118
Joined: 19 Feb 2019, 12:17
I have some signals with "moving out" lights after i placed them in my route.
So shall i post the screenshot, the signal info (its id) and the tdb and w. file here for you to check?
P.S.: also i can say that this bug is only in RTS with Open GL <40 and only if signals are placed in TSRE. In RTS with Open GL 40 or higher and even in MSTS there is no such a bug. Dont know why. Very strange.

User avatar
Goku
Site Admin
Posts: 363
Joined: 15 Jan 2019, 18:10
Location: Poland
Contact:
Yes. Please make screenshots and the tdb and w files.

And then tdb and w file after you fix it. (if you do that, ofc)

Kapitaen13
Posts: 46
Joined: 16 Jan 2019, 15:21
I think, to find the difference between MSTS and OR, the .tit should be checked as well.

Greetings Jan

User avatar
Goku
Site Admin
Posts: 363
Joined: 15 Jan 2019, 18:10
Location: Poland
Contact:
TIT is just a copy of TDB trackitem table with only one difference - signal links are defined by xyz location and not real link to track junction.

Archimage
Posts: 118
Joined: 19 Feb 2019, 12:17
Here it is:
https://drive.google.com/open?id=1ZCrEf ... N2y_M1ayb-
In the archieve there are 2 folders: "bugged" and "fixed", each containing screenshots, world, tit and tdb for bugged/fixed states of two signals on one tile. For signal Shunter Small Signal WR there are screenshots named 1-1 and 1-2 in "bugged" and "1" in "fixed" and for signal 3-light Small Signal GR_YW there are screenshots named 2-1 and 2-2 in "bugged" and "2" in "fixed".

User avatar
Goku
Site Admin
Posts: 363
Joined: 15 Jan 2019, 18:10
Location: Poland
Contact:
The difference that I see in your files is different place of "-" sign here:
QDirection ( 0 0.425977 0 -0.904734 )

QDirection ( 0 -0.425977 0 0.904734 )

Could you tell me how did you fix this signal? Was it double flip?

I think that maybe old version of RTS doesn't like negative value of the last number inside QDirection.

Archimage
Posts: 118
Joined: 19 Feb 2019, 12:17
Goku wrote: 08 Mar 2020, 19:49 The difference that I see in your files is different place of "-" sign here:
QDirection ( 0 0.425977 0 -0.904734 )

QDirection ( 0 -0.425977 0 0.904734 )

Could you tell me how did you fix this signal? Was it double flip?

I think that maybe old version of RTS doesn't like negative value of the last number inside QDirection.
Yes. It was fixed by double-flip.
Also if the signal is good (not bugged) but you double-flip it so it can be bugged after that and need new double-flip to fix.

User avatar
Goku
Site Admin
Posts: 363
Joined: 15 Jan 2019, 18:10
Location: Poland
Contact:
So, this problem is caused by negative quaternion. Probably old RTS renderer uses only first three values and that cause this bug.
This case is easy to fix. Fix will be included in next TSRE version.

Now focus on the next case - when lights move out?

Post Reply