Skip to content

Commit 65c8461

Browse files
committed
Fix bug in specific container layout on wagons
1 parent 17423b9 commit 65c8461

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/FreightAnimations.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,8 @@ public void UpdateEmptyFreightAnims(float containerLengthM)
695695
if (Math.Abs(emptyAnim.Offset.Z - Offset.Z) < FullSuperpositionTolerance) emptyAnim.LoadPosition = LoadPosition.Center;
696696
else if (Math.Abs(emptyAnim.LoadingAreaLength + anim.LoadingAreaLength - LoadingAreaLength / 2) < FullSuperpositionTolerance)
697697
emptyAnim.LoadPosition = anim.LoadPosition == LoadPosition.Front ? LoadPosition.CenterFront : LoadPosition.CenterRear;
698+
else if (emptyAnim.LoadingAreaLength + EmptySuperpositionTolerance > Container.Length20ftM)
699+
emptyAnim.LoadPosition = anim.LoadPosition == LoadPosition.Front ? LoadPosition.CenterRear : LoadPosition.CenterFront;
698700
continue;
699701
}
700702
}

0 commit comments

Comments
 (0)