Skip to content

Commit 67a4665

Browse files
committed
Automatic merge of T1.5.1-689-g9d41208f0 and 18 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 67014b7: 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 a088cf7: Implement Polach Adhesion - Pull request #882 at 753b622: Blueprint/train car operations UI window - Pull request #883 at edcc2dd: SwitchPanel disconnect/connect handling - Pull request #885 at c81447b: feat: Add notifications to Menu - Pull request #886 at 34e8cae: Scene viewer extension to TrackViewer - Pull request #888 at d7daf62: docs: Document player application model - Pull request #890 at 39a9fa4: Allow depart early - Pull request #892 at 1f5ba4c: Signal Function OPP_SIG_ID_TRAINPATH - Pull request #893 at bf8876b: Signal errors - Pull request #894 at 794fddf: Correct Decrease Colour - Pull request #896 at 5866028: First implementation of https://blueprints.launchpad.net/or/+spec/specific-sounds-for-ai-trains - Pull request #897 at 64a29c8: feat: Improved system information collection
20 parents 7ad6fbc + 9d41208 + c59c788 + d00beb9 + 67014b7 + f8dbeab + 43bf33e + f92de76 + a088cf7 + 753b622 + edcc2dd + c81447b + 34e8cae + d7daf62 + 39a9fa4 + 1f5ba4c + bf8876b + 794fddf + 5866028 + 64a29c8 commit 67a4665

File tree

6 files changed

+4
-24
lines changed

6 files changed

+4
-24
lines changed

Source/Orts.Formats.Msts/SignalConfigurationFile.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,8 +1052,6 @@ public class SignalAspect
10521052
public float SpeedMpS { get; private set; }
10531053
/// <summary>Set to true if SignalFlags ASAP option specified, meaning train needs to go to speed As Soon As Possible</summary>
10541054
public bool Asap { get; private set; }
1055-
/// <summary>Set to true if SignalFlags NoSpeedUpdate option specified, meaning speed limits are not in any way affected by the state of this signal>
1056-
public bool NoSpeedUpdate { get; private set; }
10571055
/// <summary>Set to true if SignalFlags RESET option specified (ORTS only)</summary>
10581056
public bool Reset;
10591057
/// <summary>Set to true if no speed reduction is required for RESTRICTED or STOP_AND_PROCEED aspects (ORTS only) </summary>
@@ -1070,7 +1068,6 @@ public SignalAspect(MstsSignalAspect reqAspect, string reqName)
10701068
DrawStateName = String.Copy(reqName);
10711069
SpeedMpS = -1;
10721070
Asap = false;
1073-
NoSpeedUpdate = false;
10741071
NoSpeedReduction = false;
10751072
}
10761073

@@ -1102,7 +1099,6 @@ public SignalAspect(STFReader stf)
11021099
switch (stf.ReadString().ToLower())
11031100
{
11041101
case "asap": Asap = true; break;
1105-
case "or_nospeedupdate": NoSpeedUpdate = true; break;
11061102
case "or_speedreset": Reset = true; break;
11071103
case "or_nospeedreduction": NoSpeedReduction = true; break;
11081104
default: stf.StepBackOneItem(); STFException.TraceInformation(stf, "Skipped unknown DrawLight flag " + stf.ReadString()); break;

Source/Orts.Simulation/Simulation/AIs/AITrain.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6846,7 +6846,6 @@ public static ObjectItemInfo RestoreActiveItem(BinaryReader inf, Signals signalR
68466846
thisInfo.speed_passenger = inf.ReadSingle();
68476847
thisInfo.speed_freight = inf.ReadSingle();
68486848
thisInfo.speed_flag = inf.ReadInt32();
6849-
thisInfo.no_speedUpdate = inf.ReadInt32();
68506849
thisInfo.actual_speed = inf.ReadSingle();
68516850

68526851
thisInfo.processed = inf.ReadBoolean();
@@ -6898,7 +6897,6 @@ public static void SaveActiveItem(BinaryWriter outf, ObjectItemInfo ActiveItem)
68986897
outf.Write(ActiveItem.speed_passenger);
68996898
outf.Write(ActiveItem.speed_freight);
69006899
outf.Write(ActiveItem.speed_flag);
6901-
outf.Write(ActiveItem.no_speedUpdate);
69026900
outf.Write(ActiveItem.actual_speed);
69036901

69046902
outf.Write(ActiveItem.processed);

Source/Orts.Simulation/Simulation/Physics/Train.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3514,7 +3514,6 @@ public void UpdateSignalState(int backward)
35143514
firstObject.speed_passenger = thisSpeed?.speed_pass ?? -1;
35153515
firstObject.speed_freight = thisSpeed?.speed_freight ?? -1;
35163516
firstObject.speed_flag = thisSpeed?.speed_flag ?? 0;
3517-
firstObject.no_speedUpdate = thisSpeed?.no_speedUpdate ?? 0;
35183517
firstObject.speed_reset = thisSpeed?.speed_reset ?? 0;
35193518
break;
35203519

@@ -3525,7 +3524,6 @@ public void UpdateSignalState(int backward)
35253524
firstObject.speed_freight = thisSpeed?.speed_freight ?? -1;
35263525
firstObject.speed_flag = thisSpeed?.speed_flag ?? 0;
35273526
firstObject.speed_reset = thisSpeed?.speed_reset ?? 0;
3528-
firstObject.no_speedUpdate = thisSpeed?.no_speedUpdate ?? 0;
35293527
firstObject.speed_noSpeedReductionOrIsTempSpeedReduction = thisSpeed?.speed_noSpeedReductionOrIsTempSpeedReduction ?? 0;
35303528
firstObject.speed_isWarning = thisSpeed?.speed_isWarning ?? false;
35313529
break;
@@ -3555,15 +3553,13 @@ public void UpdateSignalState(int backward)
35553553
nextObject.speed_passenger = -1;
35563554
nextObject.speed_freight = -1;
35573555
nextObject.speed_flag = 0;
3558-
nextObject.no_speedUpdate = 0;
35593556
nextObject.speed_reset = 0;
35603557
}
35613558
else
35623559
{
35633560
nextObject.speed_passenger = thisSpeed?.speed_pass ?? -1;
35643561
nextObject.speed_freight = thisSpeed?.speed_freight ?? -1;
35653562
nextObject.speed_flag = thisSpeed?.speed_flag ?? 0;
3566-
nextObject.no_speedUpdate = thisSpeed?.no_speedUpdate ?? 0;
35673563
nextObject.speed_reset = thisSpeed?.speed_reset ?? 0;
35683564
}
35693565
break;
@@ -3574,7 +3570,6 @@ public void UpdateSignalState(int backward)
35743570
nextObject.speed_passenger = thisSpeed?.speed_pass ?? -1;
35753571
nextObject.speed_freight = thisSpeed?.speed_freight ?? -1;
35763572
nextObject.speed_flag = thisSpeed?.speed_flag ?? 0;
3577-
nextObject.no_speedUpdate = thisSpeed?.no_speedUpdate ?? 0;
35783573
nextObject.speed_reset = thisSpeed?.speed_reset ?? 0;
35793574
nextObject.speed_noSpeedReductionOrIsTempSpeedReduction = thisSpeed?.speed_noSpeedReductionOrIsTempSpeedReduction ?? 0;
35803575
nextObject.speed_isWarning = thisSpeed?.speed_isWarning ?? false;
@@ -3650,7 +3645,6 @@ public void UpdateSignalState(int backward)
36503645
nextObject.speed_passenger = thisSpeed?.speed_pass ?? -1;
36513646
nextObject.speed_freight = thisSpeed?.speed_freight ?? -1;
36523647
nextObject.speed_flag = thisSpeed?.speed_flag ?? 0;
3653-
nextObject.no_speedUpdate = thisSpeed?.no_speedUpdate ?? 0;
36543648
nextObject.speed_reset = thisSpeed?.speed_reset ?? 0;
36553649
break;
36563650

@@ -3660,7 +3654,6 @@ public void UpdateSignalState(int backward)
36603654
nextObject.speed_passenger = thisSpeed?.speed_pass ?? -1;
36613655
nextObject.speed_freight = thisSpeed?.speed_freight ?? -1;
36623656
nextObject.speed_flag = thisSpeed?.speed_flag ?? 0;
3663-
nextObject.no_speedUpdate = thisSpeed?.no_speedUpdate ?? 0;
36643657
nextObject.speed_reset = thisSpeed?.speed_reset ?? 0;
36653658
nextObject.speed_noSpeedReductionOrIsTempSpeedReduction = thisSpeed?.speed_noSpeedReductionOrIsTempSpeedReduction ?? 0;
36663659
nextObject.speed_isWarning = thisSpeed?.speed_isWarning ?? false;
@@ -3828,7 +3821,7 @@ public void UpdateSpeedInfo()
38283821
#endif
38293822
}
38303823
}
3831-
else if (thisObject.no_speedUpdate == 1)
3824+
else
38323825
{
38333826
validSpeedSignalMpS = TrainMaxSpeedMpS;
38343827
float newSpeedMpS = Math.Min(validSpeedSignalMpS, Math.Min(validSpeedLimitMpS, validTempSpeedLimitMpS));

Source/Orts.Simulation/Simulation/Signalling/ObjectItemInfo.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ public enum ObjectItemFindState
5757
public int speed_reset;
5858
// for signals: if = 1 no speed reduction; for speedposts: if = 0 standard; = 1 start of temp speedreduction post; = 2 end of temp speed reduction post
5959
public int speed_noSpeedReductionOrIsTempSpeedReduction;
60-
public int no_speedUpdate;
6160
public bool speed_isWarning;
6261
public float actual_speed; // set active by TRAIN
6362

@@ -79,7 +78,6 @@ public ObjectItemInfo(SignalObject thisObject, float distance)
7978
speed_passenger = -1; // set active by TRAIN
8079
speed_freight = -1; // set active by TRAIN
8180
speed_flag = 0; // set active by TRAIN
82-
no_speedUpdate = 0; // set active by TRAIN
8381
speed_reset = 0; // set active by TRAIN
8482
speed_noSpeedReductionOrIsTempSpeedReduction = 0;
8583
}
@@ -91,7 +89,6 @@ public ObjectItemInfo(SignalObject thisObject, float distance)
9189
speed_passenger = speed_info.speed_pass;
9290
speed_freight = speed_info.speed_freight;
9391
speed_flag = speed_info.speed_flag;
94-
no_speedUpdate = speed_info.no_speedUpdate;
9592
speed_reset = speed_info.speed_reset;
9693
speed_noSpeedReductionOrIsTempSpeedReduction = speed_info.speed_noSpeedReductionOrIsTempSpeedReduction;
9794
speed_isWarning = speed_info.speed_isWarning;

Source/Orts.Simulation/Simulation/Signalling/ObjectSpeedInfo.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,16 @@ public class ObjectSpeedInfo
2222
public float speed_pass;
2323
public float speed_freight;
2424
public int speed_flag;
25-
public int no_speedUpdate;
2625
public int speed_reset;
2726
public int speed_noSpeedReductionOrIsTempSpeedReduction;
2827
public bool speed_isWarning;
2928

30-
public ObjectSpeedInfo(float pass, float freight, bool asap, bool reset, int nospeedreductionOristempspeedreduction, bool isWarning, bool nospeedupdate = false)
29+
public ObjectSpeedInfo(float pass, float freight, bool asap, bool reset, int nospeedreductionOristempspeedreduction, bool isWarning)
3130
{
3231
speed_pass = pass;
3332
speed_freight = freight;
3433
speed_flag = asap ? 1 : 0;
3534
speed_reset = reset ? 1 : 0;
36-
no_speedUpdate = nospeedupdate ? 1 : 0;
3735
speed_noSpeedReductionOrIsTempSpeedReduction = nospeedreductionOristempspeedreduction;
3836
speed_isWarning = isWarning;
3937
}

Source/Orts.Simulation/Simulation/Signalling/SignalHead.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@ public SignalHead(SignalObject sigObject, int trItem, int TDBRef, SpeedPostItem
9999

100100
float passSpeed = speedItem.IsPassenger ? speedMpS : -1;
101101
float freightSpeed = speedItem.IsFreight ? speedMpS : -1;
102-
ObjectSpeedInfo speedinfo = new ObjectSpeedInfo(passSpeed, freightSpeed, false, false, speedItem is TempSpeedPostItem ? (speedMpS == 999f ? 2 : 1) : 0,
103-
speedItem.IsWarning);
102+
ObjectSpeedInfo speedinfo = new ObjectSpeedInfo(passSpeed, freightSpeed, false, false, speedItem is TempSpeedPostItem ? (speedMpS == 999f ? 2 : 1) : 0, speedItem.IsWarning);
104103
speed_info[(int)state] = speedinfo;
105104
}
106105

@@ -129,8 +128,7 @@ public void SetSignalType(TrItem[] TrItems, SignalConfigurationFile sigCFG)
129128
foreach (SignalAspect thisAspect in signalType.Aspects)
130129
{
131130
int arrindex = (int)thisAspect.Aspect;
132-
speed_info[arrindex] = new ObjectSpeedInfo(thisAspect.SpeedMpS, thisAspect.SpeedMpS, thisAspect.Asap, thisAspect.Reset,
133-
thisAspect.NoSpeedReduction ? 1 : 0, false, thisAspect.NoSpeedUpdate);
131+
speed_info[arrindex] = new ObjectSpeedInfo(thisAspect.SpeedMpS, thisAspect.SpeedMpS, thisAspect.Asap, thisAspect.Reset, thisAspect.NoSpeedReduction ? 1 : 0, false);
134132
}
135133

136134
// set normal subtype

0 commit comments

Comments
 (0)