Skip to content

Commit

Permalink
Merge pull request #928 from SteelFill/dpu_brakes
Browse files Browse the repository at this point in the history
Fix Missing Initializations From Copy() in MSTSLocomotive
  • Loading branch information
SteelFill committed Mar 28, 2024
2 parents 0a17d98 + 9f2f220 commit 1c55709
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Source/Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1273,16 +1273,28 @@ public override void Copy(MSTSWagon copy)
CompressorRestartPressurePSI = locoCopy.CompressorRestartPressurePSI;
CompressorIsMUControlled = locoCopy.CompressorIsMUControlled;
TrainBrakePipeLeakPSIorInHgpS = locoCopy.TrainBrakePipeLeakPSIorInHgpS;
BrakePipeTimeFactorS = locoCopy.BrakePipeTimeFactorS;
BrakeServiceTimeFactorPSIpS = locoCopy.BrakeServiceTimeFactorPSIpS;
BrakeEmergencyTimeFactorPSIpS = locoCopy.BrakeEmergencyTimeFactorPSIpS;
BrakePipeChargingRatePSIorInHgpS = locoCopy.BrakePipeChargingRatePSIorInHgpS;
BrakePipeQuickChargingRatePSIpS = locoCopy.BrakePipeQuickChargingRatePSIpS;
MaxMainResPressurePSI = locoCopy.MaxMainResPressurePSI;
MainResPressurePSI = locoCopy.MaxMainResPressurePSI;
MaximumMainReservoirPipePressurePSI = locoCopy.MaximumMainReservoirPipePressurePSI;
MainResVolumeM3 = locoCopy.MainResVolumeM3;
MainResChargingRatePSIpS = locoCopy.MainResChargingRatePSIpS;
EngineBrakeApplyRatePSIpS = locoCopy.EngineBrakeApplyRatePSIpS;
EngineBrakeReleaseRatePSIpS = locoCopy.EngineBrakeReleaseRatePSIpS;
BrakePipeDischargeTimeFactor = locoCopy.BrakePipeDischargeTimeFactor;
DriveWheelOnlyBrakes = locoCopy.DriveWheelOnlyBrakes;
DynamicBrakeBlendingEnabled = locoCopy.DynamicBrakeBlendingEnabled;
DynamicBrakeAvailable = locoCopy.DynamicBrakeAvailable;
airPipeSystem = locoCopy.airPipeSystem;
DoesVacuumBrakeCutPower = locoCopy.DoesVacuumBrakeCutPower;
DoesBrakeCutPower = locoCopy.DoesBrakeCutPower;
BrakeCutsPowerAtBrakeCylinderPressurePSI = locoCopy.BrakeCutsPowerAtBrakeCylinderPressurePSI;
BrakeCutsPowerAtBrakePipePressurePSI = locoCopy.BrakeCutsPowerAtBrakePipePressurePSI;
BrakeRestoresPowerAtBrakePipePressurePSI = locoCopy.BrakeRestoresPowerAtBrakePipePressurePSI;
DynamicBrakeCommandStartTime = locoCopy.DynamicBrakeCommandStartTime;
DynamicBrakeBlendingOverride = locoCopy.DynamicBrakeBlendingOverride;
DynamicBrakeBlendingForceMatch = locoCopy.DynamicBrakeBlendingForceMatch;
Expand All @@ -1291,6 +1303,7 @@ public override void Copy(MSTSWagon copy)
MainPressureUnit = locoCopy.MainPressureUnit;
BrakeSystemPressureUnits = locoCopy.BrakeSystemPressureUnits;
IsDriveable = copy.IsDriveable;
EngineOperatingProcedures = locoCopy.EngineOperatingProcedures;

ThrottleController = (MSTSNotchController)locoCopy.ThrottleController.Clone();
SteamHeatController = (MSTSNotchController)locoCopy.SteamHeatController.Clone();
Expand All @@ -1308,9 +1321,14 @@ public override void Copy(MSTSWagon copy)
}
else
DPDynamicBrakeController = null;
DPSyncTrainApplication = locoCopy.DPSyncTrainApplication;
DPSyncTrainRelease = locoCopy.DPSyncTrainRelease;
DPSyncEmergency = locoCopy.DPSyncEmergency;
DPSyncIndependent = locoCopy.DPSyncIndependent;

LocomotivePowerSupply.Copy(locoCopy.LocomotivePowerSupply);
TrainControlSystem.Copy(locoCopy.TrainControlSystem);
VigilanceMonitor = locoCopy.VigilanceMonitor;
LocomotiveName = locoCopy.LocomotiveName;
MaxVaccuumMaxPressurePSI = locoCopy.MaxVaccuumMaxPressurePSI;
VacuumBrakeEQFitted = locoCopy.VacuumBrakeEQFitted;
Expand All @@ -1324,6 +1342,8 @@ public override void Copy(MSTSWagon copy)
WaterScoopWidthM = locoCopy.WaterScoopWidthM;
CruiseControl = locoCopy.CruiseControl?.Clone(this);
MultiPositionControllers = locoCopy.CloneMPC(this);
OnLineCabRadio = locoCopy.OnLineCabRadio;
OnLineCabRadioURL = locoCopy.OnLineCabRadioURL;
}

/// <summary>
Expand Down

0 comments on commit 1c55709

Please sign in to comment.