Skip to content

Commit 462902d

Browse files
committed
Automatic merge of T1.5.1-585-g2be1faa5d and 12 pull requests
- Pull request #757 at 98dd1a7: Unify RailDriver code implementations - Pull request #831 at fc94364: poor mans switch panel on tablet - Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters - Pull request #841 at ce3bc1f: https://blueprints.launchpad.net/or/+spec/animating-trainset-windows - Pull request #853 at d05f581: Notify out of focus - Pull request #855 at b39e5d8: Adds new route from TrainSimulations - Pull request #857 at 9afc8c3: Adding Air Flow Meters - Pull request #865 at 776d6df: Dispatcher window improvements - Pull request #866 at c15333e: Fix Articulation For 0-Axle Train Cars - Pull request #870 at 5cb32fa: Fix water restore - Pull request #873 at cf0ed99: Reduce allocations in signal script - Pull request #874 at d500329: Dynamic brake controller refactoring
14 parents d6fa5da + 2be1faa + 98dd1a7 + fc94364 + d00beb9 + ce3bc1f + d05f581 + b39e5d8 + 9afc8c3 + 776d6df + c15333e + 5cb32fa + cf0ed99 + d500329 commit 462902d

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

Source/RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ public override void HandleUserInput(ElapsedTime elapsedTime)
327327
train.DbfEvalValueChanged = true;//Debrief eval
328328
}
329329
}
330-
else if (UserInput.IsReleased(command) || SwitchPanelModule.IsUp(command))
330+
else if (UserInput.IsReleased(command))
331331
{
332332
UserInputCommands[command][0]();
333333
//Debrief eval

Source/RunActivity/Viewer3D/UserInput.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public static bool IsPressed(UserCommand command)
154154
return true;
155155
var setting = InputSettings.Commands[(int)command];
156156
return (setting.IsKeyDown(KeyboardState) && !setting.IsKeyDown(LastKeyboardState)) ||
157-
SwitchPanelModule.IsDown(command);
157+
SwitchPanelModule.IsPressed(command);
158158
}
159159

160160
public static bool IsReleased(UserCommand command)
@@ -163,7 +163,8 @@ public static bool IsReleased(UserCommand command)
163163
if (RDState != null && RDState.IsReleased(command))
164164
return true;
165165
var setting = InputSettings.Commands[(int)command];
166-
return !setting.IsKeyDown(KeyboardState) && setting.IsKeyDown(LastKeyboardState);
166+
return (!setting.IsKeyDown(KeyboardState) && setting.IsKeyDown(LastKeyboardState)) ||
167+
SwitchPanelModule.IsReleased(command);
167168
}
168169

169170
public static bool IsDown(UserCommand command)

Source/RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchPanelModule.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,15 @@ protected override Task OnMessageReceivedAsync(IWebSocketContext context, byte[]
6565
return Task.CompletedTask;
6666
}
6767

68-
public static bool IsDown(UserCommand userCommand)
68+
public static bool IsPressed(UserCommand userCommand)
6969
{
7070
if ((Connections > 0) && InitDone)
7171
return SwitchesOnPanelStatic.IsPressed(userCommand);
7272
else
7373
return false;
7474
}
7575

76-
public static bool IsUp(UserCommand userCommand)
76+
public static bool IsReleased(UserCommand userCommand)
7777
{
7878
if ((Connections > 0) && InitDone)
7979
return SwitchesOnPanelStatic.IsReleased(userCommand);

0 commit comments

Comments
 (0)