summaryrefslogtreecommitdiff
path: root/src/station_cmd.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-02-27 14:03:06 +0000
committeralberth <alberth@openttd.org>2010-02-27 14:03:06 +0000
commitfee81aedcb36ea7d34596d692d5a613379bfc0e6 (patch)
tree018458a3b22b42a9dc5f444408e1a9ebefdab3be /src/station_cmd.cpp
parenta4927dcd21679294cf7eedc03e57d811ee71b4df (diff)
downloadopenttd-fee81aedcb36ea7d34596d692d5a613379bfc0e6.tar.xz
(svn r19274) -Codechange: CmdBuildAirport() returns the 'too spread out' error via CommandCost, if needed.
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r--src/station_cmd.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index 5d710d640..f40bf4927 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -2073,8 +2073,7 @@ CommandCost CmdBuildAirport(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
int h = as->size_y;
if (w > _settings_game.station.station_spread || h > _settings_game.station.station_spread) {
- _error_message = STR_ERROR_STATION_TOO_SPREAD_OUT;
- return CMD_ERROR;
+ return_cmd_error(STR_ERROR_STATION_TOO_SPREAD_OUT);
}
CommandCost cost = CheckFlatLand(TileArea(tile, w, h), flags);