Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 745d101 commit 0d2162aCopy full SHA for 0d2162a
Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/Axle.cs
@@ -262,16 +262,15 @@ public void Save(BinaryWriter outf)
262
public void Restore(BinaryReader inf)
263
{
264
int count = inf.ReadInt32();
265
- if (AxleList.Count == 0)
+ for (int i = 0; i < count; i++)
266
267
- for (int i = 0; i < count; i++)
+ if (i >= AxleList.Count)
268
269
AxleList.Add(new Axle());
270
AxleList[i].Initialize();
271
}
272
+ AxleList[i].Restore(inf);
273
- foreach (var axle in AxleList)
274
- axle.Restore(inf);
275
276
/// <summary>
277
/// Updates each axle on the list
0 commit comments