equal
deleted
inserted
replaced
754 } |
754 } |
755 } |
755 } |
756 |
756 |
757 TileIndex RoadVehicle::GetOrderStationLocation(StationID station) |
757 TileIndex RoadVehicle::GetOrderStationLocation(StationID station) |
758 { |
758 { |
|
759 if (station == this->last_station_visited) this->last_station_visited = INVALID_STATION; |
|
760 |
759 TileIndex dest = INVALID_TILE; |
761 TileIndex dest = INVALID_TILE; |
760 |
|
761 const RoadStop *rs = GetStation(station)->GetPrimaryRoadStop(this); |
762 const RoadStop *rs = GetStation(station)->GetPrimaryRoadStop(this); |
762 if (rs != NULL) { |
763 if (rs != NULL) { |
763 uint mindist = MAX_UVALUE(uint); |
764 uint mindist = MAX_UVALUE(uint); |
764 |
765 |
765 for (; rs != NULL; rs = rs->GetNextRoadStop(this)) { |
766 for (; rs != NULL; rs = rs->GetNextRoadStop(this)) { |