Skip to content

Commit

Permalink
Automatic merge of X1.3.1-197-g76b1d3e06 and 7 pull requests
Browse files Browse the repository at this point in the history
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #226 at 26983e9: EmbedIO web server graphical track monitor
- Pull request #227 at 6ec1539: EmbedIO web server graphical train driving monitor
- Pull request #228 at 72c0146: adds links to OR on Elvas Tower
- Pull request #232 at dd38ddc: JSON consist format: https://blueprints.launchpad.net/or/+spec/consist-editor
- Pull request #234 at 3ac34fe: Rehabilitate unit testing suite, migrate to xUnit 2
- Pull request #237 at abd68c3: Fixed 3D cab loading with undefined cabview control in CVF file https://bugs.launchpad.net/or/+bug/1888945
  • Loading branch information
openrails-bot committed Jul 26, 2020
9 parents c205cb2 + 76b1d3e + 7d9f14b + 26983e9 + 6ec1539 + 72c0146 + dd38ddc + 3ac34fe + abd68c3 commit 96f9577
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
12 changes: 2 additions & 10 deletions Source/Orts.Simulation/MultiPlayer/Message.cs
Original file line number Diff line number Diff line change
Expand Up @@ -326,16 +326,8 @@ public MSGPlayer(string m)
url = areas[6].Trim();
ParseTrainCars(areas[7].Trim());
leadingID = areas[1].Trim();
int index = path.LastIndexOf("\\PATHS\\", StringComparison.OrdinalIgnoreCase);
if (index > 0)
{
path = path.Remove(0, index + 7);
}
index = con.LastIndexOf("\\CONSISTS\\", StringComparison.OrdinalIgnoreCase);
if (index > 0)
{
con = con.Remove(0, index + 10);
}
path = Path.GetFileName(path);
con = Path.GetFileName(con);
if (areas.Length >= 9) { version = int.Parse(areas[8]); }
if (areas.Length >= 10)
{
Expand Down
6 changes: 4 additions & 2 deletions Source/Orts.Simulation/MultiPlayer/OnlineTrains.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
using Orts.Simulation.AIs;
using Orts.Simulation.Physics;
using Orts.Simulation.RollingStocks;
using Orts.Simulation.Simulation;
using ORTS.Content;
using ORTS.Scripting.Api;
using System;
using System.Collections.Generic;
Expand Down Expand Up @@ -140,7 +142,7 @@ public void AddPlayers(MSGPlayer player, OnlinePlayer p)
}
p.url = player.url;
p.LeadingLocomotiveID = player.leadingID;
p.con = MPManager.Simulator.BasePath + "\\TRAINS\\CONSISTS\\" + player.con;
p.con = TrainFileUtilities.ResolveTrainFile(MPManager.Simulator.BasePath, player.con);
p.path = MPManager.Simulator.RoutePath + "\\PATHS\\" + player.path;
Train train = new Train(MPManager.Simulator);
train.TrainType = Train.TRAINTYPE.REMOTE;
Expand All @@ -151,7 +153,7 @@ public void AddPlayers(MSGPlayer player, OnlinePlayer p)
{
train.Number = player.num;
}
if (player.con.Contains("tilted")) train.IsTilting = true;
train.IsTilting = GenericTrain.IsTilting(Path.GetFileNameWithoutExtension(player.con));
int direction = player.dir;
train.travelled = player.Travelled;
train.TrainMaxSpeedMpS = player.trainmaxspeed;
Expand Down

0 comments on commit 96f9577

Please sign in to comment.