Skip to content

Commit ebf04a1

Browse files
authored
Merge pull request #71 from Csantucci/Fix-single-track-section-path
Fix single track section path bug. https://bugs.launchpad.net/or/+bug/1833577
2 parents a55289c + 8cf0346 commit ebf04a1

File tree

1 file changed

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

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15521,14 +15521,14 @@ public TCRoutePath(AIPath aiPath, int orgDir, float thisTrainLength, Signals org
1552115521
newDir = junctionNode.TrPins[firstpin].Direction;
1552215522
}
1552315523
}
15524-
15525-
currentDir = newDir;
15526-
1552715524
//
1552815525
// find next junction path node
1552915526
//
15530-
1553115527
nextPathNode = thisPathNode.NextMainNode;
15528+
15529+
// if we were on last main node, direction was already set
15530+
if (nextPathNode != null) currentDir = newDir;
15531+
1553215532
}
1553315533
else
1553415534
{

0 commit comments

Comments
 (0)