mirror of https://github.com/OpenTTD/OpenTTD
(svn r5897) -Fix [ 1519167 ] Bus trying to service in depot of other company (mart3p)
parent
68c2a77910
commit
d87487c493
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue