Skip to content

Commit

Permalink
Automatic merge of T1.5.1-384-g9bc71d854 and 15 pull requests
Browse files Browse the repository at this point in the history
- Pull request #570 at de7a14f: Experimental glTF 2.0 support with PBR lighting
- Pull request #732 at c163e21: Improvements for air brakes
- Pull request #751 at 00981a2: Web interface to control cab controls with external hardware
- Pull request #799 at dc03850: Consolidated wind simulation
- Pull request #802 at 4d198e4: Added support for activity location events to the TrackViewer
- Pull request #803 at 7157e08: Various adjustments to steam adhesion
- Pull request #813 at ff454eb: Refactored garbage generators
- Pull request #815 at a5cc165: chore: Add GitHub automatic release notes configuration
- Pull request #818 at 745d101: Allow independent drive axles for locomotives
- Pull request #821 at e0fa5a8: Adds suppression of safety valves
- Pull request #822 at 6d660af: battery switch two buttons option in combination with a delay
- Pull request #823 at 5e1c03b: Select track sound volume percent retained in .eng and .wag files
- Pull request #824 at f16ebed: Update Readme.md
- Pull request #825 at 29ed427: 2D Cabview controls for side viewpoints https://blueprints.launchpad.net/or/+spec/2dcabview-controls-for-side-views
- Pull request #826 at 2ca8fd7: Bug fix for Crash when switching cab https://bugs.launchpad.net/or/+bug/2018230
  • Loading branch information
openrails-bot committed May 3, 2023
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions Source/RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs
Expand Up @@ -255,13 +255,13 @@ public override void HandleUserInput(ElapsedTime elapsedTime)
if (Locomotive is MSTSSteamLocomotive steam)
{
steam.SetCutoffPercent(val * 100);
}
}
else if (val > 0.5f)
Locomotive.SetDirection(Direction.Forward);
Locomotive.SetDirection(Direction.Forward);
else if (val < -0.5f)
Locomotive.SetDirection(Direction.Reverse);
else
Locomotive.SetDirection(Direction.N);
Locomotive.SetDirection(Direction.Reverse);
else
Locomotive.SetDirection(Direction.N);
break;
case CABViewControlTypes.TRAIN_BRAKE:
Locomotive.SetTrainBrakePercent(val * 100);
Expand All @@ -274,17 +274,17 @@ public override void HandleUserInput(ElapsedTime elapsedTime)
Locomotive.SetEngineBrakePercent(val * 100);
break;
case CABViewControlTypes.FRONT_HLIGHT:
// changing Headlight more than one step at a time doesn't work for some reason
// changing Headlight more than one step at a time doesn't work for some reason
if (Locomotive.Headlight < val - 1)
{
Locomotive.Headlight++;
Locomotive.SignalEvent(Event.LightSwitchToggle);
}
{
Locomotive.Headlight++;
Locomotive.SignalEvent(Event.LightSwitchToggle);
}
if (Locomotive.Headlight > val - 1)
{
Locomotive.Headlight--;
Locomotive.SignalEvent(Event.LightSwitchToggle);
}
{
Locomotive.Headlight--;
Locomotive.SignalEvent(Event.LightSwitchToggle);
}
break;
case CABViewControlTypes.ORTS_SELECTED_SPEED_SELECTOR:
Locomotive.CruiseControl.SelectedSpeedMpS = val;
Expand Down

0 comments on commit ad84830

Please sign in to comment.