(svn r7810) -Fix: FS#504 Building airport whose size exceeds max station spread-out caused assert. (Zuu)

This commit is contained in:
KUDr 2007-01-03 22:55:53 +00:00
parent 9930b9890f
commit db02336ef1
1 changed files with 5 additions and 0 deletions

View File

@ -1705,6 +1705,11 @@ int32 CmdBuildAirport(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (st != NULL && st->facilities) st = NULL;
}
if (w > _patches.station_spread || h > _patches.station_spread) {
_error_message = STR_306C_STATION_TOO_SPREAD_OUT;
return CMD_ERROR;
}
if (st != NULL) {
if (st->owner != OWNER_NONE && st->owner != _current_player)
return_cmd_error(STR_3009_TOO_CLOSE_TO_ANOTHER_STATION);