diff options
author | KUDr <kudr@openttd.org> | 2006-08-26 22:24:32 +0000 |
---|---|---|
committer | KUDr <kudr@openttd.org> | 2006-08-26 22:24:32 +0000 |
commit | 5a763f32a5e513f9d98b3c08622207f9f0b74fce (patch) | |
tree | 5e55df28300ef3b0de58d2f52052f7096df6d4b3 /yapf/yapf_road.cpp | |
parent | 45fa3002088a914fe19ae59f0f4eef77f214e92e (diff) | |
download | openttd-5a763f32a5e513f9d98b3c08622207f9f0b74fce.tar.xz |
(svn r6160) -Fix [ 1519167 ] Bus trying to service in depot of other company (mart3p)
thanks Darkvater for hotfix (r5897)
Diffstat (limited to 'yapf/yapf_road.cpp')
-rw-r--r-- | yapf/yapf_road.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/yapf/yapf_road.cpp b/yapf/yapf_road.cpp index 30ece09b2..483f82a0f 100644 --- a/yapf/yapf_road.cpp +++ b/yapf/yapf_road.cpp @@ -83,7 +83,7 @@ public: } // if there are no reachable trackdirs on new tile, we have end of road - TrackFollower F; + TrackFollower F(Yapf().GetVehicle()); if (!F.Follow(tile, trackdir)) break; // if there are more trackdirs available & reachable, we are at the end of segment @@ -235,7 +235,7 @@ public: * and adds it to the open list by calling Yapf().AddNewNode(n) */ inline void PfFollowNode(Node& old_node) { - TrackFollower F; + TrackFollower F(Yapf().GetVehicle()); if (F.Follow(old_node.m_segment_last_tile, old_node.m_segment_last_td)) Yapf().AddMultipleNodes(&old_node, F.m_new_tile, F.m_new_td_bits); } @@ -365,7 +365,6 @@ public: Node& n = Yapf().GetBestNode(); TileIndex depot_tile = n.m_segment_last_tile; assert(IsTileDepotType(depot_tile, TRANSPORT_ROAD)); - if (!IsTileOwner(depot_tile, (Owner)v->owner)) return false; Depot* ret = GetDepotByTile(depot_tile); return ret; } |