mirror of https://github.com/OpenTTD/OpenTTD
Fix: RemoveAirport function now returns with 'Aircraft in the way' error message as it should be.
parent
a76e5e1970
commit
b18c2d140c
|
@ -2359,7 +2359,9 @@ static CommandCost RemoveAirport(TileIndex tile, DoCommandFlag flags)
|
||||||
const Aircraft *a;
|
const Aircraft *a;
|
||||||
FOR_ALL_AIRCRAFT(a) {
|
FOR_ALL_AIRCRAFT(a) {
|
||||||
if (!a->IsNormalAircraft()) continue;
|
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) {
|
if (flags & DC_EXEC) {
|
||||||
|
|
Loading…
Reference in New Issue