diff options
author | rubidium <rubidium@openttd.org> | 2009-07-24 15:18:25 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-07-24 15:18:25 +0000 |
commit | c3d2c47faa6bb9c07c362127b4fb5de79130bfa0 (patch) | |
tree | 6478960a00fd8d58956b9fdb0981ad1bf995f373 /src/npf.cpp | |
parent | cf38a5bee6628f4be58a1bd7774658cf86807d5c (diff) | |
download | openttd-c3d2c47faa6bb9c07c362127b4fb5de79130bfa0.tar.xz |
(svn r16940) -Codechange: make the pathfinders behave the same when finding waypoints or stations, i.e. don't force exactly one destination tile for a waypoint
Diffstat (limited to 'src/npf.cpp')
-rw-r--r-- | src/npf.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/npf.cpp b/src/npf.cpp index dccb5a0cd..6f64227e7 100644 --- a/src/npf.cpp +++ b/src/npf.cpp @@ -1103,7 +1103,7 @@ void NPFFillWithOrderData(NPFFindStationOrTileData *fstd, Vehicle *v, bool reser * dest_tile, not just any stop of that station. * So only for train orders to stations we fill fstd->station_index, for all * others only dest_coords */ - if (v->current_order.IsType(OT_GOTO_STATION) && v->type == VEH_TRAIN) { + if (v->type == VEH_TRAIN && (v->current_order.IsType(OT_GOTO_STATION) || v->current_order.IsType(OT_GOTO_WAYPOINT))) { fstd->station_index = v->current_order.GetDestination(); /* Let's take the closest tile of the station as our target for trains */ fstd->dest_coords = CalcClosestStationTile(fstd->station_index, v->tile); |