Fix: RemoveAirport function now returns with 'Aircraft in the way' error message as it should be.

This commit is contained in:
Juriy Petrochenkov 2019-08-09 13:13:34 +03:00 committed by Charles Pigott
parent 27d676e17a
commit f0aea2d246
1 changed files with 3 additions and 1 deletions

View File

@ -2389,7 +2389,9 @@ static CommandCost RemoveAirport(TileIndex tile, DoCommandFlag flags)
const Aircraft *a;
FOR_ALL_AIRCRAFT(a) {
if (!a->IsNormalAircraft()) continue;
if (a->targetairport == st->index && a->state != FLYING) return CMD_ERROR;
if (a->targetairport == st->index && a->state != FLYING) {
return_cmd_error(STR_ERROR_AIRCRAFT_IN_THE_WAY);
}
}
if (flags & DC_EXEC) {