Import infrastructure sharing patch

Strip trailing whitespace
Remove a leftover line form settings.ini

http://www.tt-forums.net/viewtopic.php?p=1008843#p1008843
This commit is contained in:
patch-import
2015-08-06 22:24:24 +01:00
committed by Jonathan G Rennison
parent 856896c36e
commit ee791055f9
32 changed files with 794 additions and 66 deletions

View File

@@ -31,6 +31,7 @@
#include "pathfinder/opf/opf_ship.h"
#include "engine_base.h"
#include "company_base.h"
#include "infrastructure_func.h"
#include "tunnelbridge_map.h"
#include "zoom_func.h"
@@ -127,7 +128,7 @@ static const Depot *FindClosestShipDepot(const Vehicle *v, uint max_distance)
FOR_ALL_DEPOTS(depot) {
TileIndex tile = depot->xy;
if (IsShipDepotTile(tile) && IsTileOwner(tile, v->owner)) {
if (IsShipDepotTile(tile) && IsInfraTileUsageAllowed(VEH_SHIP, v->owner, tile)) {
uint dist = DistanceManhattan(tile, v->tile);
if (dist < best_dist) {
best_dist = dist;