Skip to content

Commit f7892dd

Browse files
committed
Fix: Loco brake delay issue
1 parent 259016f commit f7892dd

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

source/OpenBVE/Parsers/Train/TrainDatParser.cs

+10-2
Original file line numberDiff line numberDiff line change
@@ -297,13 +297,21 @@ internal static void ParseTrainData(string FileName, System.Text.Encoding Encodi
297297
case 4:
298298
if (currentFormat == TrainDatFormats.openBVE && myVersion >= 1534)
299299
{
300-
Train.Handles.LocoBrake.DelayUp = Lines[i].Split(',').Select(Convert.ToDouble).ToArray();
300+
locoBrakeDelayUp = Lines[i].Split(',').Select(Convert.ToDouble).ToArray();
301+
}
302+
else
303+
{
304+
locoBrakeDelayUp = new[] {a};
301305
}
302306
break;
303307
case 5:
304308
if (currentFormat == TrainDatFormats.openBVE && myVersion >= 1534)
305309
{
306-
Train.Handles.LocoBrake.DelayDown = Lines[i].Split(',').Select(Convert.ToDouble).ToArray();
310+
locoBrakeDelayDown = Lines[i].Split(',').Select(Convert.ToDouble).ToArray();
311+
}
312+
else
313+
{
314+
locoBrakeDelayDown = new[] {a};
307315
}
308316
break;
309317
}

0 commit comments

Comments
 (0)