mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 15:41:15 +00:00
(svn r18880) -Fix: aircraft can be send to an hangar when the target airport has one and when it can land, not only when it has a plane terminal
This commit is contained in:
parent
fdfd0ab922
commit
b76a5669f5
@ -531,10 +531,8 @@ static void CheckIfAircraftNeedsService(Aircraft *v)
|
|||||||
|
|
||||||
assert(st != NULL);
|
assert(st != NULL);
|
||||||
|
|
||||||
/* only goto depot if the target airport has terminals (eg. it is airport) */
|
/* only goto depot if the target airport has a depot */
|
||||||
if (st->airport_tile != INVALID_TILE && st->Airport()->terminals != NULL) {
|
if (st->GetAirportSpec()->nof_depots > 0 && CanVehicleUseStation(v, st)) {
|
||||||
// printf("targetairport = %d, st->index = %d\n", v->targetairport, st->index);
|
|
||||||
// v->targetairport = st->index;
|
|
||||||
v->current_order.MakeGoToDepot(st->index, ODTFB_SERVICE);
|
v->current_order.MakeGoToDepot(st->index, ODTFB_SERVICE);
|
||||||
SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH);
|
SetWindowWidgetDirty(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH);
|
||||||
} else if (v->current_order.IsType(OT_GOTO_DEPOT)) {
|
} else if (v->current_order.IsType(OT_GOTO_DEPOT)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user