Fix go to nearest depot orders using the location of a particular depot
This commit is contained in:
@@ -917,6 +917,7 @@ TileIndex Order::GetLocation(const Vehicle *v, bool airport) const
|
||||
return BaseStation::Get(this->GetDestination())->xy;
|
||||
|
||||
case OT_GOTO_DEPOT:
|
||||
if (this->GetDepotActionType() & ODATFB_NEAREST_DEPOT) return INVALID_TILE;
|
||||
if (this->GetDestination() == INVALID_DEPOT) return INVALID_TILE;
|
||||
return (v->type == VEH_AIRCRAFT) ? Station::Get(this->GetDestination())->xy : Depot::Get(this->GetDestination())->xy;
|
||||
|
||||
|
Reference in New Issue
Block a user