@@ -2228,13 +2228,13 @@ static TrainFindDepotData FindClosestTra
bool Train::FindClosestDepot(TileIndex *location, DestinationID *destination, bool *reverse)
{
TrainFindDepotData tfdd = FindClosestTrainDepot(this, 0);
if (tfdd.best_length == UINT_MAX) return false;
if (location != NULL) *location = tfdd.tile;
if (destination != NULL) *destination = GetDepotByTile(tfdd.tile)->index;
if (destination != NULL) *destination = Depot::GetByTile(tfdd.tile)->index;
if (reverse != NULL) *reverse = tfdd.reverse;
return true;
}
/** Send a train to a depot
@@ -4484,13 +4484,13 @@ static void CheckIfTrainNeedsService(Tra
v->current_order.MakeDummy();
InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH);
return;
const Depot *depot = GetDepotByTile(tfdd.tile);
const Depot *depot = Depot::GetByTile(tfdd.tile);
if (v->current_order.IsType(OT_GOTO_DEPOT) &&
v->current_order.GetDestination() != depot->index &&
!Chance16(3, 16)) {