Skip to content

Commit

Permalink
Fix: Loco brake delay issue
Browse files Browse the repository at this point in the history
  • Loading branch information
leezer3 committed Jul 26, 2018
1 parent 259016f commit f7892dd
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions source/OpenBVE/Parsers/Train/TrainDatParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -297,13 +297,21 @@ internal static void ParseTrainData(string FileName, System.Text.Encoding Encodi
case 4:
if (currentFormat == TrainDatFormats.openBVE && myVersion >= 1534)
{
Train.Handles.LocoBrake.DelayUp = Lines[i].Split(',').Select(Convert.ToDouble).ToArray();
locoBrakeDelayUp = Lines[i].Split(',').Select(Convert.ToDouble).ToArray();
}
else
{
locoBrakeDelayUp = new[] {a};
}
break;
case 5:
if (currentFormat == TrainDatFormats.openBVE && myVersion >= 1534)
{
Train.Handles.LocoBrake.DelayDown = Lines[i].Split(',').Select(Convert.ToDouble).ToArray();
locoBrakeDelayDown = Lines[i].Split(',').Select(Convert.ToDouble).ToArray();
}
else
{
locoBrakeDelayDown = new[] {a};
}
break;
}
Expand Down

0 comments on commit f7892dd

Please sign in to comment.