summaryrefslogtreecommitdiff
path: root/ship_cmd.c
diff options
context:
space:
mode:
authormatthijs <matthijs@openttd.org>2005-07-03 13:02:54 +0000
committermatthijs <matthijs@openttd.org>2005-07-03 13:02:54 +0000
commitfb8e5f61b181ca34c43d0a0e8d39ee95af2eb60a (patch)
tree6d371024326a8ed726a5b94394047c888bd1a2c8 /ship_cmd.c
parent6df35235d5b610262af8777cf2047245d271e5c9 (diff)
downloadopenttd-fb8e5f61b181ca34c43d0a0e8d39ee95af2eb60a.tar.xz
(svn r2514) - Codechange: [NPF] Move the checking of railtype into a funciton IsCompatibleRail().
- Codechange: [NPF] Check the railtype along a route against the engine type instead of against the previouse tile. This clears the way for electriefied rails. - Add: [NPF] [ 1209644 ] A penalty for crossings (peter1138)
Diffstat (limited to 'ship_cmd.c')
-rw-r--r--ship_cmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ship_cmd.c b/ship_cmd.c
index fe53aa8a8..08c652851 100644
--- a/ship_cmd.c
+++ b/ship_cmd.c
@@ -65,7 +65,7 @@ static Depot *FindClosestShipDepot(Vehicle *v)
if (_patches.new_pathfinding_all) {
NPFFoundTargetData ftd;
byte trackdir = GetVehicleTrackdir(v);
- ftd = NPFRouteToDepotTrialError(v->tile, trackdir, TRANSPORT_WATER, v->owner);
+ ftd = NPFRouteToDepotTrialError(v->tile, trackdir, TRANSPORT_WATER, v->owner, INVALID_RAILTYPE);
if (ftd.best_bird_dist == 0)
best_depot = GetDepotByTile(ftd.node.tile); /* Found target */
else
@@ -565,7 +565,7 @@ static int ChooseShipTrack(Vehicle *v, TileIndex tile, int enterdir, uint tracks
NPFFillWithOrderData(&fstd, v);
- ftd = NPFRouteToStationOrTile(src_tile, trackdir, &fstd, TRANSPORT_WATER, v->owner);
+ ftd = NPFRouteToStationOrTile(src_tile, trackdir, &fstd, TRANSPORT_WATER, v->owner, INVALID_RAILTYPE);
if (ftd.best_trackdir != 0xff)
/* If ftd.best_bird_dist is 0, we found our target and ftd.best_trackdir contains