From b18c2d140cb787c24bcf4c615501a1e5be3a9c1d Mon Sep 17 00:00:00 2001 From: Juriy Petrochenkov Date: Fri, 9 Aug 2019 13:13:34 +0300 Subject: [PATCH] Fix: RemoveAirport function now returns with 'Aircraft in the way' error message as it should be. --- src/station_cmd.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 2e0a8589f4..1ba1f3847c 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -2359,7 +2359,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) {