Skip to content

Commit 8df4524

Browse files
committed
Hotfix: Cable cars are unable to turn around at end-of-line stations
1 parent d335327 commit 8df4524

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

TLM/TLM/Custom/PathFinding/CustomPathFind.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,6 +1032,7 @@ private void ProcessItemMain(uint unitId, BufferItem item, ref NetSegment prevSe
10321032
bool explorePrevSegment = false;
10331033
bool isStrictLaneArrowPolicyEnabled = false;
10341034
bool handleStockUturn = (this._vehicleTypes & VehicleInfo.VehicleType.Tram) == VehicleInfo.VehicleType.None;
1035+
bool stockUturn = (nextNode.m_flags & (NetNode.Flags.End | NetNode.Flags.OneWayOut)) != NetNode.Flags.None;
10351036

10361037
if (prevLaneEndRouting.routed) {
10371038
bool prevIsOutgoingOneWay = nextIsStartNode ? prevSegmentRouting.startNodeOutgoingOneWay : prevSegmentRouting.endNodeOutgoingOneWay;
@@ -1110,8 +1111,6 @@ private void ProcessItemMain(uint unitId, BufferItem item, ref NetSegment prevSe
11101111
#endif
11111112
}
11121113

1113-
bool stockUturn = false;
1114-
11151114
if (allowPedestrians || !prevLaneEndRouting.routed) {
11161115
/* pedestrian to bicycle switch or no routing information available */
11171116

0 commit comments

Comments
 (0)