Skip to content

Commit fb71607

Browse files
committed
Automatic merge of T1.5.1-992-g1383ac843 and 16 pull requests
- Pull request #799 at dfc715e: Consolidated wind simulation - 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 b3f83ed: Blueprint/train car operations UI window - Pull request #885 at 56c17fb: feat: Add notifications to Menu - Pull request #891 at 9a1d6b2: Auto save - Pull request #892 at 1f5ba4c: Signal Function OPP_SIG_ID_TRAINPATH - Pull request #896 at 5866028: First implementation of https://blueprints.launchpad.net/or/+spec/specific-sounds-for-ai-trains - Pull request #900 at c27f32d: DMI updates - Pull request #903 at 3e390b8: Downloading route content (Github, zip) - Pull request #912 at cda1d74: New Triple Valve Features Vol. 2 - Pull request #922 at abe2e52: Autopilot for timetable mode - Pull request #946 at 66f836c: Advanced track sounds - Pull request #948 at a687981: Fix Cycling Lights - Pull request #949 at c2a5d32: Oil Burning Locomotive - Pull request #950 at a98ff62: Ctrl-F5 showing yellow rectangles where mouse left button is active
18 parents cc40043 + 1383ac8 + dfc715e + d00beb9 + f92de76 + b3f83ed + 56c17fb + 9a1d6b2 + 1f5ba4c + 5866028 + c27f32d + 3e390b8 + cda1d74 + abe2e52 + 66f836c + a687981 + c2a5d32 + a98ff62 commit fb71607

File tree

3 files changed

+34
-34
lines changed

3 files changed

+34
-34
lines changed

Source/Orts.Formats.Msts/CabViewFile.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,12 +1302,12 @@ public CVCDiscrete(STFReader stf, string basepath, DiscreteStates discreteState)
13021302
{
13031303
//This if clause covers among others following cases:
13041304
// Case 1 (e.g. engine brake lever of gp38):
1305-
//NumFrames ( 18 2 9 )
1306-
//NumPositions ( 2 0 1 )
1307-
//NumValues ( 2 0 0.3 )
1308-
//Orientation ( 0 )
1309-
//DirIncrease ( 0 )
1310-
//ScaleRange ( 0 1 )
1305+
//NumFrames ( 18 2 9 )
1306+
//NumPositions ( 2 0 1 )
1307+
//NumValues ( 2 0 0.3 )
1308+
//Orientation ( 0 )
1309+
//DirIncrease ( 0 )
1310+
//ScaleRange ( 0 1 )
13111311
// Add missing positions
13121312
Positions.Add(FramesCount - 1);
13131313
// Fill empty Values
@@ -1322,12 +1322,12 @@ public CVCDiscrete(STFReader stf, string basepath, DiscreteStates discreteState)
13221322
{
13231323
//This if clause covers among others following cases:
13241324
// Case 1 (e.g. train brake lever of Acela):
1325-
//NumFrames ( 12 4 3 )
1326-
//NumPositions ( 5 0 1 9 10 11 )
1327-
//NumValues ( 5 0 0.2 0.85 0.9 0.95 )
1328-
//Orientation ( 1 )
1329-
//DirIncrease ( 1 )
1330-
//ScaleRange ( 0 1 )
1325+
//NumFrames ( 12 4 3 )
1326+
//NumPositions ( 5 0 1 9 10 11 )
1327+
//NumValues ( 5 0 0.2 0.85 0.9 0.95 )
1328+
//Orientation ( 1 )
1329+
//DirIncrease ( 1 )
1330+
//ScaleRange ( 0 1 )
13311331
//
13321332
// Fill empty Values
13331333
int iValues = 1;

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

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2204,10 +2204,10 @@ public override void Update(float elapsedClockSeconds)
22042204
{
22052205
// Check if dynamic brake needs to be disabled before displaying control confirmation
22062206
if (!CheckDisableDynamicBrake())
2207-
Simulator.Confirmer.UpdateWithPerCent(
2208-
CabControl.DynamicBrake,
2209-
DynamicBrakeController.UpdateValue > 0 ? CabSetting.Increase : CabSetting.Decrease,
2210-
DynamicBrakeController.CurrentValue * 100);
2207+
Simulator.Confirmer.UpdateWithPerCent(
2208+
CabControl.DynamicBrake,
2209+
DynamicBrakeController.UpdateValue > 0 ? CabSetting.Increase : CabSetting.Decrease,
2210+
DynamicBrakeController.CurrentValue * 100);
22112211
}
22122212

22132213
// SimpleControlPhysics and if locomotive is a control car advanced adhesion will be "disabled".
@@ -2426,8 +2426,8 @@ protected virtual void UpdateControllers(float elapsedClockSeconds)
24262426
}
24272427
else if (DynamicBrakeController.UpdateValue > 0)
24282428
StopDynamicBrakeIncrease();
2429-
}
2430-
else
2429+
}
2430+
else
24312431
DynamicBrakePause = false;
24322432
}
24332433
else if (DynamicBrakeController.UpdateValue != 0)
@@ -4090,7 +4090,7 @@ public float GetThrottleHandleValue(float data)
40904090
/// </summary>
40914091
public void SetCombinedHandleValue(float value)
40924092
{
4093-
bool ccUseCombinedControl = CruiseControl != null && (CruiseControl.UseThrottleAsForceSelector || CruiseControl.UseThrottleAsSpeedSelector ) && CruiseControl.UseThrottleInCombinedControl;
4093+
bool ccUseCombinedControl = CruiseControl != null && (CruiseControl.UseThrottleAsForceSelector || CruiseControl.UseThrottleAsSpeedSelector ) && CruiseControl.UseThrottleInCombinedControl;
40944094
bool canBrake = ThrottleController.CurrentValue == 0;
40954095
if (ccUseCombinedControl && CruiseControl.SpeedRegMode == CruiseControl.SpeedRegulatorMode.Auto)
40964096
canBrake = (CruiseControl.UseThrottleAsForceSelector && CruiseControl.SelectedMaxAccelerationPercent == 0) || (CruiseControl.UseThrottleAsSpeedSelector && CruiseControl.SelectedSpeedMpS == 0);
@@ -4099,7 +4099,7 @@ public void SetCombinedHandleValue(float value)
40994099
if (CombinedControlType == CombinedControl.ThrottleDynamic && DynamicBrakeController.CurrentValue > 0 &&
41004100
!(ccUseCombinedControl && !CruiseControl.DynamicBrakePriority && CruiseControl.SpeedRegMode == CruiseControl.SpeedRegulatorMode.Auto))
41014101
{
4102-
SetDynamicBrakeValue((MathHelper.Clamp(value, CombinedControlSplitPosition, 1) - CombinedControlSplitPosition) / (1 - CombinedControlSplitPosition));
4102+
SetDynamicBrakeValue((MathHelper.Clamp(value, CombinedControlSplitPosition, 1) - CombinedControlSplitPosition) / (1 - CombinedControlSplitPosition));
41034103
}
41044104
else if (CombinedControlType == CombinedControl.ThrottleAir && TrainBrakeController.CurrentValue > 0)
41054105
{
@@ -4118,9 +4118,9 @@ public void SetCombinedHandleValue(float value)
41184118
}
41194119
// Return to throttling
41204120
else if ((DynamicBrakeController?.CurrentValue ?? 0) <= 0 ||
4121-
(CruiseControl != null && !CruiseControl.DynamicBrakePriority && CruiseControl.SpeedRegMode == CruiseControl.SpeedRegulatorMode.Auto))
4121+
(CruiseControl != null && !CruiseControl.DynamicBrakePriority && CruiseControl.SpeedRegMode == CruiseControl.SpeedRegulatorMode.Auto))
41224122
{
4123-
SetThrottleValue(1 - MathHelper.Clamp(value, 0, CombinedControlSplitPosition) / CombinedControlSplitPosition);
4123+
SetThrottleValue(1 - MathHelper.Clamp(value, 0, CombinedControlSplitPosition) / CombinedControlSplitPosition);
41244124

41254125
if (CombinedControlType == CombinedControl.ThrottleAir)
41264126
TrainBrakeController.IntermediateValue = 0;
@@ -4157,12 +4157,12 @@ public float GetCombinedHandleValue(bool intermediateValue)
41574157
}
41584158

41594159
if (CombinedControlType == CombinedControl.ThrottleDynamic && throttleValue <= 0 && dynamicsValue > 0)
4160-
{
4160+
{
41614161
if (CruiseControl != null && CruiseControl.SkipThrottleDisplay && !CruiseControl.DynamicBrakeCommandHasPriorityOverCruiseControl)
4162-
return CombinedControlSplitPosition;
4163-
else
4162+
return CombinedControlSplitPosition;
4163+
else
41644164
return CombinedControlSplitPosition + (1 - CombinedControlSplitPosition) * (dynamicsValue ?? 0);
4165-
}
4165+
}
41664166
else if (CombinedControlType == CombinedControl.ThrottleAir && throttleValue <= 0 && brakesValue > 0)
41674167
return CombinedControlSplitPosition + (1 - CombinedControlSplitPosition) * (brakesValue ?? 0);
41684168
else if (CruiseControl == null)
@@ -4790,7 +4790,7 @@ public void StartDynamicBrakeDecrease(float? target)
47904790
{
47914791
StopDynamicBrakeDecrease();
47924792
if (!CheckDisableDynamicBrake())
4793-
Simulator.Confirmer.ConfirmWithPerCent(CabControl.DynamicBrake, DynamicBrakeController.CurrentValue * 100);
4793+
Simulator.Confirmer.ConfirmWithPerCent(CabControl.DynamicBrake, DynamicBrakeController.CurrentValue * 100);
47944794
return;
47954795
}
47964796
}
@@ -4833,10 +4833,10 @@ public void SetDynamicBrakeValue(float value)
48334833
if (Direction == Direction.N)
48344834
{
48354835
Simulator.Confirmer.Warning(CabControl.DynamicBrake, CabSetting.Warn1);
4836-
return;
4837-
}
4836+
return;
4837+
}
48384838
if (!CanUseDynamicBrake())
4839-
return;
4839+
return;
48404840
if (!DynamicBrake && DynamicBrakeControllerSetupLock && DynamicBrakeController.CurrentValue > 0)
48414841
return;
48424842
if (CruiseControl != null && CruiseControl.UseThrottleAsForceSelector && !CruiseControl.DynamicBrakePriority && !CruiseControl.UseThrottleInCombinedControl)

Source/RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2147,16 +2147,16 @@ public virtual int GetDrawIndex()
21472147
var dynBrakePercent = (Locomotive.Train.TrainType == Train.TRAINTYPE.AI_PLAYERHOSTING || Locomotive.Train.Autopilot) ?
21482148
Locomotive.DynamicBrakePercent : Locomotive.LocalDynamicBrakePercent;
21492149
if (dynBrakePercent <= 0)
2150-
index = 0;
2150+
index = 0;
21512151
else if (Locomotive.DynamicBrakeController != null)
21522152
{
21532153
if (!Locomotive.HasSmoothStruc)
21542154
index = Locomotive.DynamicBrakeController.CurrentNotch;
21552155
else
21562156
index = PercentToIndex(Locomotive.DynamicBrakeController.CurrentValue);
2157-
}
2158-
else
2159-
index = PercentToIndex(dynBrakePercent);
2157+
}
2158+
else
2159+
index = PercentToIndex(dynBrakePercent);
21602160
break;
21612161
case CABViewControlTypes.CPH_DISPLAY:
21622162
case CABViewControlTypes.CP_HANDLE:

0 commit comments

Comments
 (0)