forked from mirror/OpenTTD
(svn r14428) -Fix [FS#2306]: A 90-degree curve can be a safe waiting position if they are forbidden for trains.
This commit is contained in:
@@ -437,8 +437,8 @@ no_entry_cost: // jump here at the beginning if the node has no parent (it is th
|
||||
end_segment_reason |= ESRB_DEAD_END;
|
||||
}
|
||||
|
||||
if (TrackFollower::DoTrackMasking() && tf_local.m_err != TrackFollower::EC_90DEG) {
|
||||
if (!HasOnewaySignalBlockingTrackdir(cur.tile, cur.td)) end_segment_reason |= ESRB_SAFE_TILE;
|
||||
if (TrackFollower::DoTrackMasking() && !HasOnewaySignalBlockingTrackdir(cur.tile, cur.td)) {
|
||||
end_segment_reason |= ESRB_SAFE_TILE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@@ -85,8 +85,8 @@ public:
|
||||
FORCEINLINE bool PfDetectDestination(TileIndex tile, Trackdir td)
|
||||
{
|
||||
return
|
||||
IsSafeWaitingPosition(Yapf().GetVehicle(), tile, td, true, TrackFollower::Allow90degTurns()) &&
|
||||
IsWaitingPositionFree(Yapf().GetVehicle(), tile, td, TrackFollower::Allow90degTurns());
|
||||
IsSafeWaitingPosition(Yapf().GetVehicle(), tile, td, true, !TrackFollower::Allow90degTurns()) &&
|
||||
IsWaitingPositionFree(Yapf().GetVehicle(), tile, td, !TrackFollower::Allow90degTurns());
|
||||
}
|
||||
|
||||
/** Called by YAPF to calculate cost estimate. Calculates distance to the destination
|
||||
|
Reference in New Issue
Block a user