Skip to content

Commit c9c39ea

Browse files
committed
Automatic merge of T1.5.1-791-gffaeec028 and 14 pull requests
- Pull request #570 at 3539862: Experimental glTF 2.0 support with PBR lighting - Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters - Pull request #876 at f92de76: docs: add source for documents previously on website to source Documentation folder - Pull request #882 at a055bca: Blueprint/train car operations UI window - Pull request #885 at d9ce84b: feat: Add notifications to Menu - Pull request #886 at 6c0785b: Scene viewer extension to TrackViewer - Pull request #892 at 1f5ba4c: Signal Function OPP_SIG_ID_TRAINPATH - Pull request #893 at bf8876b: Signal errors - Pull request #896 at 5866028: First implementation of https://blueprints.launchpad.net/or/+spec/specific-sounds-for-ai-trains - Pull request #897 at 0a9d939: feat: Improved system information collection - Pull request #899 at 1663ee4: Duplex steam engines - Booster Engine addition - Pull request #903 at c5f6638: Downloading route content from Github - Pull request #906 at 0e0aa8b: Bug fix for https://bugs.launchpad.net/or/+bug/2047299 Crash loading a 3Dcab-only loco - Pull request #907 at 9b0b04f: Bug fix for https://bugs.launchpad.net/or/+bug/2047300 Dynamic tracks disappear after long tunnel
16 parents caa580d + ffaeec0 + 3539862 + d00beb9 + f92de76 + a055bca + d9ce84b + 6c0785b + 1f5ba4c + bf8876b + 5866028 + 0a9d939 + 1663ee4 + c5f6638 + 0e0aa8b + 9b0b04f commit c9c39ea

File tree

1 file changed

+19
-22
lines changed

1 file changed

+19
-22
lines changed

Source/Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1470,9 +1470,6 @@ public override void Initialize()
14701470
SteamGearRatio = 1.0f; // set gear ratio to default, as not a geared locomotive
14711471

14721472
SteamEngines[i].MaxTractiveEffortLbf = (SteamEngines[i].NumberCylinders / 2.0f) * (Me.ToIn(SteamEngines[i].CylindersDiameterM) * Me.ToIn(SteamEngines[i].CylindersDiameterM) * Me.ToIn(SteamEngines[i].CylindersStrokeM) / (2 * Me.ToIn(SteamEngines[i].AttachedAxle.WheelRadiusM))) * MaxBoilerPressurePSI * TractiveEffortFactor * MotiveForceGearRatio * CylinderEfficiencyRate;
1473-
1474-
Trace.TraceInformation("MaxTE - {0} Wheel Radius {1}", MaxTractiveEffortLbf, SteamEngines[i].AttachedAxle.WheelRadiusM);
1475-
14761473
}
14771474
else // Default to Simple Locomotive (Assumed Simple) shows up as "Unknown"
14781475
{
@@ -8189,32 +8186,32 @@ public void ToggleCylinderCocks()
81898186

81908187
public void ToggleCylinderCompound()
81918188
{
8192-
8193-
if (SteamEngineType == SteamEngineTypes.Compound) // only use this control if a compound locomotive
8189+
for (int i = 0; i < SteamEngines.Count; i++)
81948190
{
8195-
CylinderCompoundOn = !CylinderCompoundOn;
8196-
SignalEvent(Event.CylinderCompoundToggle);
8197-
if (IsPlayerTrain)
8191+
if (SteamEngineType == SteamEngineTypes.Compound) // only use this control if a compound locomotive
81988192
{
8199-
Simulator.Confirmer.Confirm(CabControl.CylinderCompound, CylinderCompoundOn ? CabSetting.On : CabSetting.Off);
8200-
}
8201-
if (!CylinderCompoundOn) // Compound bypass valve closed - operating in compound mode
8202-
{
8203-
// Calculate maximum tractive effort if set for compounding
8204-
for (int i = 0; i < SteamEngines.Count; i++)
8193+
CylinderCompoundOn = !CylinderCompoundOn;
8194+
SignalEvent(Event.CylinderCompoundToggle);
8195+
if (IsPlayerTrain)
82058196
{
8197+
Simulator.Confirmer.Confirm(CabControl.CylinderCompound, CylinderCompoundOn ? CabSetting.On : CabSetting.Off);
8198+
}
8199+
if (!CylinderCompoundOn) // Compound bypass valve closed - operating in compound mode
8200+
{
8201+
// Calculate maximum tractive effort if set for compounding
8202+
82068203
MaxTractiveEffortLbf = CylinderEfficiencyRate * (1.6f * MaxBoilerPressurePSI * Me.ToIn(SteamEngines[i].LPCylindersDiameterM) * Me.ToIn(SteamEngines[i].LPCylindersDiameterM) * Me.ToIn(SteamEngines[i].LPCylindersStrokeM)) / ((CompoundCylinderRatio + 1.0f) * (Me.ToIn(SteamEngines[i].AttachedAxle.WheelRadiusM * 2.0f)));
8204+
8205+
DisplayMaxTractiveEffortLbf = MaxTractiveEffortLbf;
82078206
}
8208-
DisplayMaxTractiveEffortLbf = MaxTractiveEffortLbf;
8209-
}
8210-
else // Compound bypass valve opened - operating in simple mode
8211-
{
8212-
// Calculate maximum tractive effort if set to simple operation
8213-
for (int i = 0; i < SteamEngines.Count; i++)
8207+
else // Compound bypass valve opened - operating in simple mode
82148208
{
8215-
MaxTractiveEffortLbf += CylinderEfficiencyRate * (1.6f * MaxBoilerPressurePSI * Me.ToIn(SteamEngines[i].CylindersDiameterM) * Me.ToIn(SteamEngines[i].CylindersDiameterM) * Me.ToIn(SteamEngines[i].CylindersStrokeM)) / (Me.ToIn(SteamEngines[i].AttachedAxle.WheelRadiusM * 2.0f));
8209+
// Calculate maximum tractive effort if set to simple operation
8210+
8211+
MaxTractiveEffortLbf = CylinderEfficiencyRate * (1.6f * MaxBoilerPressurePSI * Me.ToIn(SteamEngines[i].CylindersDiameterM) * Me.ToIn(SteamEngines[i].CylindersDiameterM) * Me.ToIn(SteamEngines[i].CylindersStrokeM)) / (Me.ToIn(SteamEngines[i].AttachedAxle.WheelRadiusM * 2.0f));
8212+
8213+
DisplayMaxTractiveEffortLbf = MaxTractiveEffortLbf;
82168214
}
8217-
DisplayMaxTractiveEffortLbf = MaxTractiveEffortLbf;
82188215
}
82198216
}
82208217
}

0 commit comments

Comments
 (0)