mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
(svn r2382) - Fix: Check the airport type when building an airport
This commit is contained in:
parent
01f06784e7
commit
feec9cc7cf
@ -1672,7 +1672,7 @@ int32 CmdBuildAirport(int x, int y, uint32 flags, uint32 p1, uint32 p2)
|
||||
SET_EXPENSES_TYPE(EXPENSES_CONSTRUCTION);
|
||||
|
||||
/* Check if a valid, buildable airport was chosen for construction */
|
||||
if (!HASBIT(GetValidAirports(), p1)) return CMD_ERROR;
|
||||
if (p1 > lengthof(_airport_map5_tiles) || !HASBIT(GetValidAirports(), p1)) return CMD_ERROR;
|
||||
|
||||
tile = TILE_FROM_XY(x,y);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user