Skip to content

Commit 4ec53dc

Browse files
committed
Automatic merge of T1.5.1-684-gc6e0de1c4 and 9 pull requests
- Pull request #570 at c59c788: 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 #865 at a1318b5: Dispatcher window improvements - Pull request #874 at f8dbeab: Dynamic brake controller refactoring - Pull request #875 at 43bf33e: Bug fix for https://bugs.launchpad.net/or/+bug/2036346 Player train switching doesn't work with 3D cabs - Pull request #876 at f92de76: docs: add source for documents previously on website to source Documentation folder - Pull request #878 at 076cd04: Implement Polach Adhesion - Pull request #883 at aac4d3f: SwitchPanel disconnect/connect handling - Pull request #884 at 8b3d60a: build: Additional settings for dotnet build
11 parents daae01d + c6e0de1 + c59c788 + d00beb9 + a1318b5 + f8dbeab + 43bf33e + f92de76 + 076cd04 + aac4d3f + 8b3d60a commit 4ec53dc

File tree

17 files changed

+3692
-14
lines changed

17 files changed

+3692
-14
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,4 +365,5 @@ ASALocalRun/
365365
healthchecksdb
366366

367367
# Backup folder for Package Reference Convert tool in Visual Studio 2017
368-
MigrationBackup/
368+
MigrationBackup/
369+
/Source/RunActivity/Properties/launchSettings.json

Source/ORTS.Common/Input/UserCommand.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public enum UserCommand
2424
[GetString("Game Change Cab")] GameChangeCab,
2525
[GetString("Game Request Control")] GameRequestControl,
2626
[GetString("Game Multi Player Dispatcher")] GameMultiPlayerDispatcher,
27+
[GetString("Game Multi Player Dispatcher Beta")] GameMultiPlayerDispatcherBeta,
2728
[GetString("Game Multi Player Texting")] GameMultiPlayerTexting,
2829
[GetString("Game Switch Manual Mode")] GameSwitchManualMode,
2930
[GetString("Game Reset Out Of Control Mode")] GameResetOutOfControlMode,
@@ -61,6 +62,8 @@ public enum UserCommand
6162
[GetString("Debug Precipitation Decrease")] DebugPrecipitationDecrease,
6263
[GetString("Debug Precipitation Liquidity Increase")] DebugPrecipitationLiquidityIncrease,
6364
[GetString("Debug Precipitation Liquidity Decrease")] DebugPrecipitationLiquidityDecrease,
65+
[GetString("Debug Daylight Offset Increase")] DebugDaylightOffsetIncrease,
66+
[GetString("Debug Daylight Offset Decrease")] DebugDaylightOffsetDecrease,
6467
[GetString("Debug Weather Change")] DebugWeatherChange,
6568
[GetString("Debug Clock Forwards")] DebugClockForwards,
6669
[GetString("Debug Clock Backwards")] DebugClockBackwards,

Source/ORTS.Settings/InputSettings.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,8 @@ static void InitializeCommands(UserCommandInput[] Commands)
480480
Commands[(int)UserCommand.DebugLockShadows] = new UserCommandKeyInput(0x1F, KeyModifiers.Control | KeyModifiers.Alt);
481481
Commands[(int)UserCommand.DebugLogger] = new UserCommandKeyInput(0x58);
482482
Commands[(int)UserCommand.DebugLogRenderFrame] = new UserCommandKeyInput(0x58, KeyModifiers.Alt);
483+
Commands[(int)UserCommand.DebugDaylightOffsetDecrease] = new UserCommandKeyInput(0x0C, KeyModifiers.Shift | KeyModifiers.Alt);
484+
Commands[(int)UserCommand.DebugDaylightOffsetIncrease] = new UserCommandKeyInput(0x0D, KeyModifiers.Shift | KeyModifiers.Alt);
483485
Commands[(int)UserCommand.DebugOvercastDecrease] = new UserCommandKeyInput(0x0C, KeyModifiers.Control);
484486
Commands[(int)UserCommand.DebugOvercastIncrease] = new UserCommandKeyInput(0x0D, KeyModifiers.Control);
485487
Commands[(int)UserCommand.DebugPhysicsForm] = new UserCommandKeyInput(0x3D, KeyModifiers.Alt);
@@ -520,6 +522,7 @@ static void InitializeCommands(UserCommandInput[] Commands)
520522
Commands[(int)UserCommand.GameExternalCabController] = new UserCommandKeyInput(0x29);
521523
Commands[(int)UserCommand.GameFullscreen] = new UserCommandKeyInput(0x1C, KeyModifiers.Alt);
522524
Commands[(int)UserCommand.GameMultiPlayerDispatcher] = new UserCommandKeyInput(0x0A, KeyModifiers.Control);
525+
Commands[(int)UserCommand.GameMultiPlayerDispatcherBeta] = new UserCommandKeyInput(0x0A, KeyModifiers.Control | KeyModifiers.Shift);
523526
Commands[(int)UserCommand.GameMultiPlayerTexting] = new UserCommandKeyInput(0x14, KeyModifiers.Alt);
524527
Commands[(int)UserCommand.GamePause] = new UserCommandKeyInput(Keys.Pause);
525528
Commands[(int)UserCommand.GamePauseMenu] = new UserCommandKeyInput(0x01);

Source/Orts.Simulation/Simulation/Weather.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ public class Weather
4444

4545
// Fog/visibility distance. Ranges from 10m (can't see anything), 5km (medium), 20km (clear) to 100km (clear arctic).
4646
public float FogDistance;
47+
48+
// Daylight offset (-12h to +12h)
49+
public int DaylightOffset = 0;
4750

4851
// Precipitation liquidity; =1 for rain, =0 for snow; intermediate values possible with dynamic weather;
4952
public float PrecipitationLiquidity;

Source/RunActivity/Program.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
using System.Linq;
2121
using System.Reflection;
2222
using System.Runtime.InteropServices;
23+
using System.Windows.Forms;
2324
using Orts.Common;
2425
using Orts.Simulation;
2526
using Orts.Viewer3D;
@@ -41,6 +42,7 @@ static class Program
4142
public static Simulator Simulator;
4243
public static Viewer Viewer;
4344
public static DispatchViewer DebugViewer;
45+
public static MapViewer DebugViewerBeta;
4446
public static SoundDebugForm SoundDebugForm;
4547
public static ORTraceListener ORTraceListener;
4648
public static string logFileName = ""; // contains path to file
@@ -60,6 +62,9 @@ static void Main(string[] args)
6062
path = Path.Combine(path, (Environment.Is64BitProcess) ? "X64" : "X86");
6163
NativeMethods.SetDllDirectory(path);
6264

65+
Application.EnableVisualStyles();
66+
Application.SetCompatibleTextRenderingDefault(false);
67+
6368
var game = new Game(settings);
6469
game.PushState(new GameStateRunActivity(args));
6570
game.Run();

Source/RunActivity/Viewer3D/Debugging/DebugViewerForm.Designer.cs

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Source/RunActivity/Viewer3D/Debugging/DebugViewerForm.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2138,6 +2138,9 @@ private void ClipDrag(int diffX, int diffY)
21382138
#endregion
21392139
}
21402140

2141+
2142+
/* NOTE: Commented out to avoid duplication in namespace; copied to `DebugViewerBetaForm.cs` */
2143+
/*
21412144
#region SignalWidget
21422145
/// <summary>
21432146
/// Defines a signal being drawn in a 2D view.
@@ -2448,5 +2451,5 @@ static public double DistanceSqr(dVector v1, dVector v2)
24482451
return Math.Pow((v1.TileX - v2.TileX) * 2048 + v1.X - v2.X, 2)
24492452
+ Math.Pow((v1.TileZ - v2.TileZ) * 2048 + v1.Z - v2.Z, 2);
24502453
}
2451-
}
2454+
}*/
24522455
}

0 commit comments

Comments
 (0)