forked from mirror/OpenTTD
(svn r5897) -Fix [ 1519167 ] Bus trying to service in depot of other company (mart3p)
This commit is contained in:
@@ -365,6 +365,7 @@ public:
|
|||||||
Node& n = Yapf().GetBestNode();
|
Node& n = Yapf().GetBestNode();
|
||||||
TileIndex depot_tile = n.m_segment_last_tile;
|
TileIndex depot_tile = n.m_segment_last_tile;
|
||||||
assert(IsTileDepotType(depot_tile, TRANSPORT_ROAD));
|
assert(IsTileDepotType(depot_tile, TRANSPORT_ROAD));
|
||||||
|
if (!IsTileOwner(depot_tile, (Owner)v->owner)) return false;
|
||||||
Depot* ret = GetDepotByTile(depot_tile);
|
Depot* ret = GetDepotByTile(depot_tile);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user