File tree Expand file tree Collapse file tree 1 file changed +2
-18
lines changed
Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies Expand file tree Collapse file tree 1 file changed +2
-18
lines changed Original file line number Diff line number Diff line change @@ -1586,14 +1586,7 @@ public void Restore(BinaryReader inf)
1586
1586
OutputPowerW = inf . ReadSingle ( ) ;
1587
1587
DieselTemperatureDeg = inf . ReadSingle ( ) ;
1588
1588
GovernorEnabled = inf . ReadBoolean ( ) ;
1589
-
1590
- bool gearSaved = inf . ReadBoolean ( ) ; // read boolean which indicates gear data was saved
1591
-
1592
- if ( gearSaved )
1593
- {
1594
- GearBox = new GearBox ( this ) ;
1595
- GearBox . Restore ( inf ) ;
1596
- }
1589
+ GearBox ? . Restore ( inf ) ;
1597
1590
}
1598
1591
1599
1592
public void Save ( BinaryWriter outf )
@@ -1603,16 +1596,7 @@ public void Save(BinaryWriter outf)
1603
1596
outf . Write ( OutputPowerW ) ;
1604
1597
outf . Write ( DieselTemperatureDeg ) ;
1605
1598
outf . Write ( GovernorEnabled ) ;
1606
-
1607
- if ( GearBox != null )
1608
- {
1609
- outf . Write ( true ) ;
1610
- GearBox . Save ( outf ) ;
1611
- }
1612
- else
1613
- {
1614
- outf . Write ( false ) ;
1615
- }
1599
+ GearBox ? . Save ( outf ) ;
1616
1600
}
1617
1601
1618
1602
/// <summary>
You can’t perform that action at this time.
0 commit comments