Skip to content

Commit 5f708ca

Browse files
committed
Adjustment to HuD notification
1 parent 415aec7 commit 5f708ca

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

Source/Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ public enum LocomotiveRailDriveTypes
114114

115115
public LocomotiveRailDriveTypes LocomotiveRailDriveType;
116116

117+
public bool RackGogWheelEngaged = false;
118+
117119
// simulation parameters
118120
public bool ManualHorn = false;
119121
public bool TCSHorn = false;
@@ -2058,6 +2060,14 @@ public override void Update(float elapsedClockSeconds)
20582060
foreach (var axle in LocomotiveAxles)
20592061
{
20602062
axle.CogWheelFitted = true;
2063+
if (axle.IsRackRailway && axle.CogWheelFitted)
2064+
{
2065+
RackGogWheelEngaged = true;
2066+
}
2067+
else
2068+
{
2069+
RackGogWheelEngaged = false;
2070+
}
20612071
}
20622072
}
20632073

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7912,6 +7912,7 @@ public override string GetDebugStatus()
79127912

79137913
// calculate values for display, so that display value doesn't go negative
79147914
var superheatTempDisplayC = C.FromF(CurrentSuperheatTempF);
7915+
79157916
superheatTempDisplayC = MathHelper.Clamp(superheatTempDisplayC, 0.0f, C.FromF(MaxSuperheatRefTempF));
79167917

79177918
status.AppendFormat("{0}\t{1}\t{2}\t{3}\t{4}\t{5}\t{6}\t{7}\t{8}\n",

Source/RunActivity/Viewer3D/Popups/HUDWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,7 @@ void TextPageForceInfo(TableData table)
11771177
table.CurrentRow = row0;
11781178
var axle = mstsLocomotive.LocomotiveAxles[i];
11791179
TableSetCell(table, table.CurrentRow++, table.CurrentValueColumn + 2 * i, "{0:F0}% ({1})", axle.SlipSpeedPercent, FormatStrings.FormatVeryLowSpeedDisplay((float)axle.WheelSlipThresholdMpS, mstsLocomotive.IsMetric));
1180-
if (axle.IsRackRailway) TableSetCell(table, table.CurrentRow++, table.CurrentValueColumn + 2 * i, Viewer.Catalog.GetString("rack"));
1180+
if (mstsLocomotive.RackGogWheelEngaged) TableSetCell(table, table.CurrentRow++, table.CurrentValueColumn + 2 * i, Viewer.Catalog.GetString("Rack"));
11811181
else TableSetCell(table, table.CurrentRow++, table.CurrentValueColumn + 2 * i, "{0:F0}%", mstsLocomotive.AdhesionConditions * 100.0f);
11821182
TableSetCell(table, table.CurrentRow++, table.CurrentValueColumn + 2 * i, "{0} ({1})", FormatStrings.FormatForce(axle.DriveForceN, mstsLocomotive.IsMetric), FormatStrings.FormatPower(axle.DriveForceN * mstsLocomotive.AbsTractionSpeedMpS, mstsLocomotive.IsMetric, false, false));
11831183
TableSetCell(table, table.CurrentRow++, table.CurrentValueColumn + 2 * i, "{0}", FormatStrings.FormatForce(axle.BrakeRetardForceN, mstsLocomotive.IsMetric));

0 commit comments

Comments
 (0)