Skip to content

Commit ed72cdb

Browse files
committed
Correct conflict issue
1 parent 8e11b67 commit ed72cdb

File tree

3 files changed

+51
-52
lines changed

3 files changed

+51
-52
lines changed

Source/Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,13 @@ public override void Parse(string lowercasetoken, STFReader stf)
921921
case "engine(enginecontrollers(throttle": ThrottleController = new MSTSNotchController(stf); break;
922922
case "engine(enginecontrollers(regulator": ThrottleController = new MSTSNotchController(stf); break;
923923
case "engine(enginecontrollers(brake_dynamic": DynamicBrakeController.Parse(stf); break;
924-
924+
case "engine(ortslocomotivedrivewheelonlybraking":
925+
var wheelbraking = stf.ReadIntBlock(null);
926+
if (wheelbraking == 1)
927+
{
928+
DriveWheelOnlyBrakes = true;
929+
}
930+
break;
925931
case "engine(trainbrakescontrollermaxsystempressure":
926932
case "engine(ortstrainbrakescontrollermaxoverchargepressure":
927933
case "engine(trainbrakescontrollermaxreleaserate":
@@ -974,13 +980,6 @@ public override void Parse(string lowercasetoken, STFReader stf)
974980
CompressorIsMechanical = true;
975981
}
976982
break;
977-
case "engine(ortslocomotivedrivewheelonlybraking":
978-
var wheelbraking = stf.ReadIntBlock(null);
979-
if (wheelbraking == 1)
980-
{
981-
DriveWheelOnlyBrakes = true;
982-
}
983-
break;
984983
case "engine(trainpipeleakrate": TrainBrakePipeLeakPSIorInHgpS = stf.ReadFloatBlock(STFReader.UNITS.PressureRateDefaultPSIpS, null); break;
985984
case "engine(vacuumbrakesvacuumpumpresistance": VacuumPumpResistanceN = stf.ReadFloatBlock(STFReader.UNITS.Force, null); break;
986985

Source/Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -661,15 +661,15 @@ public float TenderCoalMassKG // Decreased by firing and increased
661661
public float Cylinders41SteamVolumeM3pS;
662662
public float Cylinders42SteamVolumeM3pS;
663663

664-
public float SteamExhaustSteamVelocityMpS;
665-
public float SteamExhaust1SteamVolumeM3pS;
666-
public float SteamExhaust2SteamVolumeM3pS;
667-
public float SteamExhaust3SteamVolumeM3pS;
668-
public float SteamExhaust4SteamVolumeM3pS;
669-
bool SteamExhaust1On = false;
670-
bool SteamExhaust2On = false;
671-
bool SteamExhaust3On = false;
672-
bool SteamExhaust4On = false;
664+
public float CylinderSteamExhaustSteamVelocityMpS;
665+
public float CylinderSteamExhaust1SteamVolumeM3pS;
666+
public float CylinderSteamExhaust2SteamVolumeM3pS;
667+
public float CylinderSteamExhaust3SteamVolumeM3pS;
668+
public float CylinderSteamExhaust4SteamVolumeM3pS;
669+
bool CylinderSteamExhaust1On = false;
670+
bool CylinderSteamExhaust2On = false;
671+
bool CylinderSteamExhaust3On = false;
672+
bool CylinderSteamExhaust4On = false;
673673

674674
public float BlowdownSteamVolumeM3pS;
675675
public float BlowdownSteamVelocityMpS;
@@ -714,7 +714,7 @@ public float TenderCoalMassKG // Decreased by firing and increased
714714
public float CompressorParticleDurationS = 3.0f;
715715
public float Cylinder1ParticleDurationS = 3.0f;
716716
public float Cylinder2ParticleDurationS = 3.0f;
717-
public float SteamExhaustParticleDurationS = 3.0f;
717+
public float CylinderSteamExhaustParticleDurationS = 3.0f;
718718
public float WhistleParticleDurationS = 3.0f;
719719
public float SafetyValvesParticleDurationS = 3.0f;
720720
public float DrainpipeParticleDurationS = 3.0f;
@@ -2132,41 +2132,41 @@ private void UpdateFX(float elapsedClockSeconds)
21322132

21332133
if (i==0 && (normalisedCrankAngleRad <= MathHelper.Pi && normalisedCrankAngleRad >= exhaustCrankAngleRad) || ( normalisedCrankAngleRad < 2 * MathHelper.Pi && normalisedCrankAngleRad >= exhaustCrankAngleRad))
21342134
{
2135-
SteamExhaust1On = true;
2135+
CylinderSteamExhaust1On = true;
21362136
}
21372137
else
21382138
{
2139-
SteamExhaust1On = false;
2139+
CylinderSteamExhaust1On = false;
21402140
}
21412141

21422142
if (i == 1 && (normalisedCrankAngleRad <= MathHelper.Pi && normalisedCrankAngleRad >= exhaustCrankAngleRad) || (normalisedCrankAngleRad < 2 * MathHelper.Pi && normalisedCrankAngleRad >= exhaustCrankAngleRad))
21432143
{
2144-
SteamExhaust2On = true;
2144+
CylinderSteamExhaust2On = true;
21452145
}
21462146
else
21472147
{
2148-
SteamExhaust2On = false;
2148+
CylinderSteamExhaust2On = false;
21492149
}
21502150

21512151
// Trace.TraceInformation("Exhaust - Factor {0} ExhaustCrank {1} RealCrank {2} NormalCrank {3} ExhaustOn {4} Cylinder {5}", CylinderExhaustOpenFactor, MathHelper.ToDegrees(exhaustCrankAngleRad), MathHelper.ToDegrees(realCrankAngleRad), MathHelper.ToDegrees(normalisedCrankAngleRad), SteamExhaust1On, i+1);
21522152

21532153

21542154
if (i == 2 && (normalisedCrankAngleRad <= MathHelper.Pi && normalisedCrankAngleRad >= exhaustCrankAngleRad) || (normalisedCrankAngleRad < 2 * MathHelper.Pi && normalisedCrankAngleRad >= exhaustCrankAngleRad))
21552155
{
2156-
SteamExhaust3On = true;
2156+
CylinderSteamExhaust3On = true;
21572157
}
21582158
else
21592159
{
2160-
SteamExhaust3On = false;
2160+
CylinderSteamExhaust3On = false;
21612161
}
21622162

21632163
if (i == 3 && (normalisedCrankAngleRad <= MathHelper.Pi && normalisedCrankAngleRad >= exhaustCrankAngleRad) || (normalisedCrankAngleRad < 2 * MathHelper.Pi && normalisedCrankAngleRad >= exhaustCrankAngleRad))
21642164
{
2165-
SteamExhaust4On = true;
2165+
CylinderSteamExhaust4On = true;
21662166
}
21672167
else
21682168
{
2169-
SteamExhaust4On = false;
2169+
CylinderSteamExhaust4On = false;
21702170
}
21712171

21722172

@@ -2378,12 +2378,12 @@ private void UpdateFX(float elapsedClockSeconds)
23782378
Cylinder2ParticleDurationS = 1.0f;
23792379

23802380

2381-
SteamExhaust1SteamVolumeM3pS = throttle > 0.0 && SteamExhaust1On ? (cutoff * 10.0f * SteamEffectsFactor) : 0.0f;
2382-
SteamExhaust2SteamVolumeM3pS = throttle > 0.0 && SteamExhaust2On ? (cutoff * 10.0f * SteamEffectsFactor) : 0.0f;
2383-
SteamExhaust3SteamVolumeM3pS = throttle > 0.0 && SteamExhaust3On ? (cutoff * 10.0f * SteamEffectsFactor) : 0.0f;
2384-
SteamExhaust4SteamVolumeM3pS = throttle > 0.0 && SteamExhaust4On ? (cutoff * 10.0f * SteamEffectsFactor) : 0.0f;
2385-
SteamExhaustSteamVelocityMpS = 100.0f;
2386-
SteamExhaustParticleDurationS = 1.0f;
2381+
CylinderSteamExhaust1SteamVolumeM3pS = throttle > 0.0 && CylinderSteamExhaust1On ? (cutoff * 10.0f * SteamEffectsFactor) : 0.0f;
2382+
CylinderSteamExhaust2SteamVolumeM3pS = throttle > 0.0 && CylinderSteamExhaust2On ? (cutoff * 10.0f * SteamEffectsFactor) : 0.0f;
2383+
CylinderSteamExhaust3SteamVolumeM3pS = throttle > 0.0 && CylinderSteamExhaust3On ? (cutoff * 10.0f * SteamEffectsFactor) : 0.0f;
2384+
CylinderSteamExhaust4SteamVolumeM3pS = throttle > 0.0 && CylinderSteamExhaust4On ? (cutoff * 10.0f * SteamEffectsFactor) : 0.0f;
2385+
CylinderSteamExhaustSteamVelocityMpS = 100.0f;
2386+
CylinderSteamExhaustParticleDurationS = 1.0f;
23872387

23882388
// Blowdown Steam Effects
23892389
BlowdownSteamVolumeM3pS = (BlowdownValveOpen && BlowdownSteamUsageLBpS > 0.0 ? (10.0f * SteamEffectsFactor) : 0.0f);

Source/RunActivity/Viewer3D/RollingStock/MSTSSteamLocomotiveViewer.cs

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ public class MSTSSteamLocomotiveViewer : MSTSLocomotiveViewer
4545
List<ParticleEmitterViewer> Cylinders32 = new List<ParticleEmitterViewer>();
4646
List<ParticleEmitterViewer> Cylinders41 = new List<ParticleEmitterViewer>();
4747
List<ParticleEmitterViewer> Cylinders42 = new List<ParticleEmitterViewer>();
48-
List<ParticleEmitterViewer> SteamExhaust1 = new List<ParticleEmitterViewer>();
49-
List<ParticleEmitterViewer> SteamExhaust2 = new List<ParticleEmitterViewer>();
50-
List<ParticleEmitterViewer> SteamExhaust3 = new List<ParticleEmitterViewer>();
51-
List<ParticleEmitterViewer> SteamExhaust4 = new List<ParticleEmitterViewer>();
48+
List<ParticleEmitterViewer> CylinderSteamExhaust1 = new List<ParticleEmitterViewer>();
49+
List<ParticleEmitterViewer> CylinderSteamExhaust2 = new List<ParticleEmitterViewer>();
50+
List<ParticleEmitterViewer> CylinderSteamExhaust3 = new List<ParticleEmitterViewer>();
51+
List<ParticleEmitterViewer> CylinderSteamExhaust4 = new List<ParticleEmitterViewer>();
5252
List<ParticleEmitterViewer> Blowdown = new List<ParticleEmitterViewer>();
5353
List<ParticleEmitterViewer> Drainpipe = new List<ParticleEmitterViewer>();
5454
List<ParticleEmitterViewer> Injectors1 = new List<ParticleEmitterViewer>();
@@ -96,14 +96,14 @@ public MSTSSteamLocomotiveViewer(Viewer viewer, MSTSSteamLocomotive car)
9696
Cylinders41.AddRange(emitter.Value);
9797
else if (emitter.Key.ToLowerInvariant() == "cylinders42fx")
9898
Cylinders42.AddRange(emitter.Value);
99-
else if (emitter.Key.ToLowerInvariant() == "steamexhaust1fx")
100-
SteamExhaust1.AddRange(emitter.Value);
101-
else if (emitter.Key.ToLowerInvariant() == "steamexhaust2fx")
102-
SteamExhaust2.AddRange(emitter.Value);
103-
else if (emitter.Key.ToLowerInvariant() == "steamexhaust3fx")
104-
SteamExhaust3.AddRange(emitter.Value);
105-
else if (emitter.Key.ToLowerInvariant() == "steamexhaust4fx")
106-
SteamExhaust4.AddRange(emitter.Value);
99+
else if (emitter.Key.ToLowerInvariant() == "cylindersteamexhaust1fx")
100+
CylinderSteamExhaust1.AddRange(emitter.Value);
101+
else if (emitter.Key.ToLowerInvariant() == "cylindersteamexhaust2fx")
102+
CylinderSteamExhaust2.AddRange(emitter.Value);
103+
else if (emitter.Key.ToLowerInvariant() == "cylindersteamexhaust3fx")
104+
CylinderSteamExhaust3.AddRange(emitter.Value);
105+
else if (emitter.Key.ToLowerInvariant() == "cylindersteamexhaust4fx")
106+
CylinderSteamExhaust4.AddRange(emitter.Value);
107107
else if (emitter.Key.ToLowerInvariant() == "blowdownfx")
108108
Blowdown.AddRange(emitter.Value);
109109
else if (emitter.Key.ToLowerInvariant() == "drainpipefx") // Drainpipe was not used in MSTS, and has no control set up for it
@@ -294,17 +294,17 @@ public override void PrepareFrame(RenderFrame frame, ElapsedTime elapsedTime)
294294
foreach (var drawer in Cylinders42)
295295
drawer.SetOutput(car.Cylinders2SteamVelocityMpS, car.Cylinders42SteamVolumeM3pS, car.Cylinder2ParticleDurationS);
296296

297-
foreach (var drawer in SteamExhaust1)
298-
drawer.SetOutput(car.SteamExhaustSteamVelocityMpS, car.SteamExhaust1SteamVolumeM3pS, car.SteamExhaustParticleDurationS);
297+
foreach (var drawer in CylinderSteamExhaust1)
298+
drawer.SetOutput(car.CylinderSteamExhaustSteamVelocityMpS, car.CylinderSteamExhaust1SteamVolumeM3pS, car.CylinderSteamExhaustParticleDurationS);
299299

300-
foreach (var drawer in SteamExhaust2)
301-
drawer.SetOutput(car.SteamExhaustSteamVelocityMpS, car.SteamExhaust2SteamVolumeM3pS, car.SteamExhaustParticleDurationS);
300+
foreach (var drawer in CylinderSteamExhaust2)
301+
drawer.SetOutput(car.CylinderSteamExhaustSteamVelocityMpS, car.CylinderSteamExhaust2SteamVolumeM3pS, car.CylinderSteamExhaustParticleDurationS);
302302

303-
foreach (var drawer in SteamExhaust3)
304-
drawer.SetOutput(car.SteamExhaustSteamVelocityMpS, car.SteamExhaust3SteamVolumeM3pS, car.SteamExhaustParticleDurationS);
303+
foreach (var drawer in CylinderSteamExhaust3)
304+
drawer.SetOutput(car.CylinderSteamExhaustSteamVelocityMpS, car.CylinderSteamExhaust3SteamVolumeM3pS, car.CylinderSteamExhaustParticleDurationS);
305305

306-
foreach (var drawer in SteamExhaust4)
307-
drawer.SetOutput(car.SteamExhaustSteamVelocityMpS, car.SteamExhaust4SteamVolumeM3pS, car.SteamExhaustParticleDurationS);
306+
foreach (var drawer in CylinderSteamExhaust4)
307+
drawer.SetOutput(car.CylinderSteamExhaustSteamVelocityMpS, car.CylinderSteamExhaust4SteamVolumeM3pS, car.CylinderSteamExhaustParticleDurationS);
308308

309309
foreach (var drawer in Blowdown)
310310
drawer.SetOutput(car.BlowdownSteamVelocityMpS, car.BlowdownSteamVolumeM3pS, car.BlowdownParticleDurationS);

0 commit comments

Comments
 (0)