summaryrefslogtreecommitdiff
path: root/src/pathfinder
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-08-18 11:37:03 +0000
committerfrosch <frosch@openttd.org>2012-08-18 11:37:03 +0000
commit9215192d342b6829fe2b6f402f6a2c36e8137997 (patch)
tree117d1fa61af23534bd10121f6cb916cd2ec228e9 /src/pathfinder
parentd5f0a383f69526ed1fddb4d8cdc8202174137bb4 (diff)
downloadopenttd-9215192d342b6829fe2b6f402f6a2c36e8137997.tar.xz
(svn r24479) -Fix: Trains were unable to reverse in stations when using NPF.
Diffstat (limited to 'src/pathfinder')
-rw-r--r--src/pathfinder/npf/npf.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pathfinder/npf/npf.cpp b/src/pathfinder/npf/npf.cpp
index 016db5abe..976767319 100644
--- a/src/pathfinder/npf/npf.cpp
+++ b/src/pathfinder/npf/npf.cpp
@@ -1240,7 +1240,7 @@ bool NPFTrainCheckReverse(const Train *v)
ftd = NPFRouteToStationOrTileTwoWay(v->tile, trackdir, false, last->tile, trackdir_rev, false, &fstd, TRANSPORT_RAIL, 0, v->owner, v->compatible_railtypes);
/* If we didn't find anything, just keep on going straight ahead, otherwise take the reverse flag */
- return ftd.best_bird_dist != 0 && NPFGetFlag(&ftd.node, NPF_FLAG_REVERSE);
+ return ftd.best_bird_dist == 0 && NPFGetFlag(&ftd.node, NPF_FLAG_REVERSE);
}
Track NPFTrainChooseTrack(const Train *v, TileIndex tile, DiagDirection enterdir, TrackBits tracks, bool &path_found, bool reserve_track, struct PBSTileInfo *target)