diff options
author | Juriy Petrochenkov <jupetr@gmail.com> | 2019-08-09 13:13:34 +0300 |
---|---|---|
committer | Charles Pigott <charlespigott@googlemail.com> | 2019-08-13 16:42:22 +0100 |
commit | f0aea2d24631cd77036ed287a5457a5f03d789a1 (patch) | |
tree | 26943928a356c89942fa54979fbd210ed6be8663 | |
parent | 27d676e17a85f611ed0fe58735df1bc250182af2 (diff) | |
download | openttd-f0aea2d24631cd77036ed287a5457a5f03d789a1.tar.xz |
Fix: RemoveAirport function now returns with 'Aircraft in the way' error message as it should be.
-rw-r--r-- | src/station_cmd.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 546aecc26..46ded9a1d 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -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) { |