Index: variables.h =================================================================== --- variables.h (revision 4649) +++ variables.h (working copy) @@ -180,7 +180,8 @@ /* * New Path Finding */ - bool new_pathfinding_all; /* Use the newest pathfinding algorithm for all */ + bool new_pathfinding_all; /* Use the newest pathfinding algorithm for all but ships */ + bool new_pathfinding_ships; /* Use the newest pathfinding algorithm for ships */ /** * The maximum amount of search nodes a single NPF run should take. This Index: ship_cmd.c =================================================================== --- ship_cmd.c (revision 4649) +++ ship_cmd.c (working copy) @@ -68,7 +68,7 @@ TileIndex tile; TileIndex tile2 = v->tile; - if (_patches.new_pathfinding_all) { + if (_patches.new_pathfinding_ships) { NPFFoundTargetData ftd; byte trackdir = GetVehicleTrackdir(v); ftd = NPFRouteToDepotTrialError(v->tile, trackdir, TRANSPORT_WATER, v->owner, INVALID_RAILTYPE); @@ -525,7 +525,7 @@ { assert(enterdir>=0 && enterdir<=3); - if (_patches.new_pathfinding_all) { + if (_patches.new_pathfinding_ships) { NPFFindStationOrTileData fstd; NPFFoundTargetData ftd; TileIndex src_tile = TILE_ADD(tile, TileOffsByDir(ReverseDiagDir(enterdir))); Index: order_cmd.c =================================================================== --- order_cmd.c (revision 4649) +++ order_cmd.c (working copy) @@ -340,7 +340,7 @@ * previous destination, for human players with new pathfinding disabled */ if (v->type == VEH_Ship && IS_HUMAN_PLAYER(v->owner) && sel_ord != 0 && GetVehicleOrder(v, sel_ord - 1)->type == OT_GOTO_STATION - && !_patches.new_pathfinding_all) { + && !_patches.new_pathfinding_ships) { int dist = DistanceManhattan( GetStation(GetVehicleOrder(v, sel_ord - 1)->station)->xy, Index: settings.c =================================================================== --- settings.c (revision 4649) +++ settings.c (working copy) @@ -1375,6 +1375,8 @@ SDT_VAR(Patches, npf_road_curve_penalty, SLE_UINT, 0, 0, 1, 0, 100000, STR_NULL, NULL), /* This is the penalty for level crossings, for both road and rail vehicles */ SDT_VAR(Patches, npf_crossing_penalty, SLE_UINT, 0, 0, (3 * NPF_TILE_LENGTH), 0, 100000, STR_NULL, NULL), + /* Enable NPF for ships too. Disabled by default due to performance reasons. */ + SDT_BOOL(Patches, new_pathfinding_ships, 0, 0, false, STR_NULL, NULL), SDT_END() };