1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-12 09:09:09 +00:00

(svn r5065) -CodeChange: [YAPF] Added PfDetectDestination(tile, trackdir) for trains (to be used by platform selection feature)

This commit is contained in:
KUDr
2006-06-01 21:00:59 +00:00
parent bf2fb59bf9
commit 76a8f036df
2 changed files with 21 additions and 8 deletions

View File

@@ -165,7 +165,7 @@ public:
RailType rail_type = GetTileRailType(tile, trackdir);
bool target_seen = false;
bool target_seen = Yapf().PfDetectDestination(tile, trackdir);
while (true) {
segment_cost += Yapf().OneTileCost(tile, trackdir);
@@ -177,7 +177,6 @@ public:
}
// finish if we have reached the destination
target_seen = Yapf().PfDetectDestination(n);
if (target_seen) {
break;
}
@@ -237,6 +236,8 @@ public:
trackdir = new_td;
tile_type = GetTileType(tile);
target_seen = Yapf().PfDetectDestination(tile, trackdir);
// reversing in depot penalty
if (tile == prev_tile) {
segment_cost += Yapf().PfGetSettings().rail_depot_reverse_penalty;