Skip to content

Commit 273f2ef

Browse files
authored
Merge pull request #1026 from Csantucci/mp-chuff
Fix for Multiplayer: remote trains chuff can't be heard https://bugs.launchpad.net/or/+bug/2092771
2 parents f9e80b9 + 6a89a97 commit 273f2ef

File tree

1 file changed

+2
-2
lines changed
  • Source/Orts.Simulation/Simulation/Physics

1 file changed

+2
-2
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -21664,7 +21664,7 @@ public void UpdateRemoteTrainPos(float elapsedClockSeconds)
2166421664
{
2166521665
car.SpeedMpS = SpeedMpS;
2166621666
if (car.Flipped) car.SpeedMpS = -car.SpeedMpS;
21667-
car.AbsSpeedMpS = car.AbsSpeedMpS * (1 - elapsedClockSeconds ) + targetSpeedMpS * elapsedClockSeconds;
21667+
car.AbsSpeedMpS = car.AbsSpeedMpS * (1 - elapsedClockSeconds ) + Math.Abs(targetSpeedMpS) * elapsedClockSeconds;
2166821668
if (car.IsDriveable && car is MSTSWagon)
2166921669
{
2167021670
(car as MSTSWagon).WheelSpeedMpS = SpeedMpS;
@@ -21683,7 +21683,7 @@ public void UpdateRemoteTrainPos(float elapsedClockSeconds)
2168321683
else if (car is MSTSSteamLocomotive)
2168421684
{
2168521685
(car as MSTSSteamLocomotive).Variable1 = car.AbsSpeedMpS / car.DriverWheelRadiusM / MathHelper.Pi * 5;
21686-
(car as MSTSSteamLocomotive).Variable2 = 0.7f;
21686+
(car as MSTSSteamLocomotive).Variable2 = 70f;
2168721687
}
2168821688
}
2168921689
else if (car is MSTSLocomotive)

0 commit comments

Comments
 (0)