Skip to content

Commit 6a89a97

Browse files
committed
Fix for Multiplayer: remote trains chuff can't be heard https://bugs.launchpad.net/or/+bug/2092771
1 parent 20e879b commit 6a89a97

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
@@ -21666,7 +21666,7 @@ public void UpdateRemoteTrainPos(float elapsedClockSeconds)
2166621666
{
2166721667
car.SpeedMpS = SpeedMpS;
2166821668
if (car.Flipped) car.SpeedMpS = -car.SpeedMpS;
21669-
car.AbsSpeedMpS = car.AbsSpeedMpS * (1 - elapsedClockSeconds ) + targetSpeedMpS * elapsedClockSeconds;
21669+
car.AbsSpeedMpS = car.AbsSpeedMpS * (1 - elapsedClockSeconds ) + Math.Abs(targetSpeedMpS) * elapsedClockSeconds;
2167021670
if (car.IsDriveable && car is MSTSWagon)
2167121671
{
2167221672
(car as MSTSWagon).WheelSpeedMpS = SpeedMpS;
@@ -21685,7 +21685,7 @@ public void UpdateRemoteTrainPos(float elapsedClockSeconds)
2168521685
else if (car is MSTSSteamLocomotive)
2168621686
{
2168721687
(car as MSTSSteamLocomotive).Variable1 = car.AbsSpeedMpS / car.DriverWheelRadiusM / MathHelper.Pi * 5;
21688-
(car as MSTSSteamLocomotive).Variable2 = 0.7f;
21688+
(car as MSTSSteamLocomotive).Variable2 = 70f;
2168921689
}
2169021690
}
2169121691
else if (car is MSTSLocomotive)

0 commit comments

Comments
 (0)