Skip to content

Commit cfabca0

Browse files
committed
Automatic merge of T1.5.1-757-gef6c1a8c8 and 17 pull requests
- Pull request #570 at 3539862: Experimental glTF 2.0 support with PBR lighting - Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters - Pull request #874 at f8dbeab: Dynamic brake controller refactoring - Pull request #875 at 43bf33e: Bug fix for https://bugs.launchpad.net/or/+bug/2036346 Player train switching doesn't work with 3D cabs - Pull request #876 at f92de76: docs: add source for documents previously on website to source Documentation folder - Pull request #882 at a055bca: Blueprint/train car operations UI window - Pull request #885 at c81447b: feat: Add notifications to Menu - Pull request #886 at 167e2e4: Scene viewer extension to TrackViewer - Pull request #888 at d7daf62: docs: Document player application model - Pull request #890 at 39a9fa4: Allow depart early - Pull request #892 at 1f5ba4c: Signal Function OPP_SIG_ID_TRAINPATH - Pull request #893 at bf8876b: Signal errors - Pull request #894 at 5ff1e73: Correct Decrease Colour - Pull request #896 at 5866028: First implementation of https://blueprints.launchpad.net/or/+spec/specific-sounds-for-ai-trains - Pull request #897 at 0a9d939: feat: Improved system information collection - Pull request #898 at e271395: Extra line with all the arguments for debugging purposes in logfile - Pull request #900 at 42ea7ad: DMI updates
19 parents 45e8945 + ef6c1a8 + 3539862 + d00beb9 + f8dbeab + 43bf33e + f92de76 + a055bca + c81447b + 167e2e4 + d7daf62 + 39a9fa4 + 1f5ba4c + bf8876b + 5ff1e73 + 5866028 + 0a9d939 + e271395 + 42ea7ad commit cfabca0

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Source/Orts.Formats.Msts/CabViewFile.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -894,12 +894,20 @@ public CVCDigital(STFReader stf, string basepath)
894894
}),
895895
new STFReader.TokenProcessor("decreasecolour", ()=>{
896896
stf.MustMatch("(");
897-
stf.ReadInt(0);
897+
int NumColor = stf.ReadInt(0);
898898
if(stf.EndOfBlock() == false)
899899
{
900+
if (NumColor == 0)
901+
{
902+
// no. of colors is set as 0 and therefor no color is defined, but if set anyway, it must be skipped
903+
stf.SkipRestOfBlock();
904+
}
905+
else
906+
{
900907
stf.ParseBlock(new STFReader.TokenProcessor[] {
901908
new STFReader.TokenProcessor("controlcolour", ()=>{ DecreaseColor = ParseControlColor(stf); }) });
902909
}
910+
}
903911
}),
904912
new STFReader.TokenProcessor("ortsfont", ()=>{ParseFont(stf); }),
905913
new STFReader.TokenProcessor("ortsangle", () => {Rotation = ParseRotation(stf); }),

0 commit comments

Comments
 (0)