STFReader performance: ORTS skips exterior sounds after reading comment in Lights section
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Open Rails |
Fix Released
|
Low
|
jeroenp |
Bug Description
Version X1966 (and earlier). Also reproducible in default and other .eng files.
This was first noticed in the Paul Charland set of 10 locomotives "cpsw10pk.zip" from Trainsim. There was no ORTS exterior sound in any of these locos; the cab sound worked fine. MSTS behaved normally.
By trial, it was discovered that if the exterior sound line in the .eng file: Sound ( "SW1200eng.sms" ) was moved to a location above the Lights() section, the exterior sounds worked normally.
It was then noticed that there was a comment line immediately preceding the line containing the closing right bracket of the Lights() section of the .eng file: e.g.
#(+++++
)
Sound ( "SW1200eng.sms" )
)
(The last right bracket above is the closing of the Wagon() section.)
If this comment line immediately preceding the end of the Lights() section is removed, the exterior sound works normally, even when the sound line follows the Lights() section. I believe that this location is used for the exterior sound line in many .eng files.
As a further confirmation, the default GP38.eng file was modified by inserting a comment on the line ahead of the closing right bracket of the Lights () section. The sound line ' Sound ( "GP38Eng.sms" ) ' follows the Lights() section. The result was that the GP38 also lost all exterior sounds (i.e. 2-view and 3-view).
In all cases, MSTS works normally - i.e. it correctly produces exterior sounds, with or without the extra comment line. There was a discussion about allowable comment lines here:
http://
Changed in or: | |
status: | New → Triaged |
importance: | Undecided → Low |
tags: | added: tests |
summary: |
- ORTS skips exterior sounds after reading comment in Lights section + STFReader performance: ORTS skips exterior sounds after reading comment + in Lights section |
Changed in or: | |
status: | Triaged → Fix Committed |
Changed in or: | |
milestone: | none → 1.0 |
Changed in or: | |
status: | Fix Committed → Fix Released |
P.S. The line "#(+++++++++++++++ End of light section +++++++ etc. )" ends on a single line in the file.