Fix send vehicle to specific depot allowing incompatible road/tram types
See: #302
This commit is contained in:
@@ -3863,7 +3863,7 @@ public:
|
||||
{
|
||||
const Vehicle *v = Vehicle::Get(this->window_number);
|
||||
if (IsDepotTile(tile) && GetDepotVehicleType(tile) == v->type && IsInfraTileUsageAllowed(v->type, v->owner, tile)) {
|
||||
if (v->type == VEH_ROAD && (GetRoadTypes(tile) & RoadVehicle::From(v)->compatible_roadtypes) == 0) return;
|
||||
if (v->type == VEH_ROAD && (GetPresentRoadTypes(tile) & RoadVehicle::From(v)->compatible_roadtypes) == 0) return;
|
||||
DoCommandP(v->tile, v->index | (this->depot_select_ctrl_pressed ? DEPOT_SERVICE : 0U) | DEPOT_SPECIFIC, tile, GetCmdSendToDepot(v));
|
||||
ResetObjectToPlace();
|
||||
this->RaiseButtons();
|
||||
|
Reference in New Issue
Block a user