summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJuriy Petrochenkov <jupetr@gmail.com>2019-08-09 13:13:34 +0300
committerCharles Pigott <charlespigott@googlemail.com>2019-08-13 16:42:22 +0100
commitf0aea2d24631cd77036ed287a5457a5f03d789a1 (patch)
tree26943928a356c89942fa54979fbd210ed6be8663 /src
parent27d676e17a85f611ed0fe58735df1bc250182af2 (diff)
downloadopenttd-f0aea2d24631cd77036ed287a5457a5f03d789a1.tar.xz
Fix: RemoveAirport function now returns with 'Aircraft in the way' error message as it should be.
Diffstat (limited to 'src')
-rw-r--r--src/station_cmd.cpp4
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) {