File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Source/Orts.Simulation/Simulation/RollingStocks Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ namespace Orts.Simulation.RollingStocks
41
41
{
42
42
public class MSTSControlTrailerCar : MSTSLocomotive
43
43
{
44
- public int ControllerNumberOfGears = 1 ;
44
+ public int ControllerNumberOfGears = 0 ;
45
45
bool HasGearController = false ;
46
46
bool ControlGearUp = false ;
47
47
bool ControlGearDown = false ;
@@ -174,7 +174,7 @@ public override void Update(float elapsedClockSeconds)
174
174
{
175
175
var locog = car as MSTSDieselLocomotive ;
176
176
177
- if ( locog != null && car != this && ! locog . IsLeadLocomotive ( ) && ( ControlGearDown || ControlGearUp ) )
177
+ if ( locog != null && locog . DieselEngines [ 0 ] . GearBox != null && locog . DieselEngines [ 0 ] . GearBox != null && car != this && ! locog . IsLeadLocomotive ( ) && ( ControlGearDown || ControlGearUp ) )
178
178
{
179
179
if ( ControlGearUp )
180
180
{
@@ -194,7 +194,7 @@ public override void Update(float elapsedClockSeconds)
194
194
}
195
195
196
196
// Read values for the HuD and other requirements, will be based upon the last motorcar
197
- if ( locog != null )
197
+ if ( locog != null && locog . DieselEngines [ 0 ] . GearBox != null && locog . DieselEngines [ 0 ] . GearBox != null )
198
198
{
199
199
ControlGearIndex = locog . DieselEngines [ 0 ] . GearBox . CurrentGearIndex ;
200
200
ControlGearIndication = locog . DieselEngines [ 0 ] . GearBox . GearIndication ;
You can’t perform that action at this time.
0 commit comments