(svn r8474) -Fix

Turn GetPrimaryRoadStop() into a method of struct Station
This commit is contained in:
tron
2007-01-31 04:34:56 +00:00
parent 8b4f046fd1
commit 36d965a697
3 changed files with 10 additions and 17 deletions

View File

@@ -690,8 +690,7 @@ static void ProcessRoadVehOrder(Vehicle *v)
v->last_station_visited = INVALID_STATION;
}
rs = GetPrimaryRoadStop(
GetStation(order->dest),
rs = GetStation(order->dest)->GetPrimaryRoadStop(
v->cargo_type == CT_PASSENGERS ? RoadStop::BUS : RoadStop::TRUCK
);
@@ -1660,7 +1659,7 @@ void OnNewDay_RoadVeh(Vehicle *v)
/* update destination */
if (v->current_order.type == OT_GOTO_STATION && v->u.road.slot == NULL && !(v->vehstatus & VS_CRASHED)) {
Station* st = GetStation(v->current_order.dest);
RoadStop* rs = GetPrimaryRoadStop(st, v->cargo_type == CT_PASSENGERS ? RoadStop::BUS : RoadStop::TRUCK);
RoadStop* rs = st->GetPrimaryRoadStop(v->cargo_type == CT_PASSENGERS ? RoadStop::BUS : RoadStop::TRUCK);
RoadStop* best = NULL;
if (rs != NULL) {