summaryrefslogtreecommitdiff
path: root/src/yapf
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2008-10-01 15:48:44 +0000
committermichi_cc <michi_cc@openttd.org>2008-10-01 15:48:44 +0000
commitba5575e0fc5d3b1314def4e9121a6b92207455ce (patch)
tree334b42c3b892538fe7f76fb9f932d8e6068035b8 /src/yapf
parentc9a82ac3e7540c57488fb72b351496fe75d4ceeb (diff)
downloadopenttd-ba5575e0fc5d3b1314def4e9121a6b92207455ce.tar.xz
(svn r14428) -Fix [FS#2306]: A 90-degree curve can be a safe waiting position if they are forbidden for trains.
Diffstat (limited to 'src/yapf')
-rw-r--r--src/yapf/yapf_costrail.hpp4
-rw-r--r--src/yapf/yapf_destrail.hpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/yapf/yapf_costrail.hpp b/src/yapf/yapf_costrail.hpp
index 8259f4bb9..e7e301d93 100644
--- a/src/yapf/yapf_costrail.hpp
+++ b/src/yapf/yapf_costrail.hpp
@@ -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;
}
diff --git a/src/yapf/yapf_destrail.hpp b/src/yapf/yapf_destrail.hpp
index da5d82a5c..503b7f530 100644
--- a/src/yapf/yapf_destrail.hpp
+++ b/src/yapf/yapf_destrail.hpp
@@ -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