(svn r14952) -Codechange: unify the "can vehicle go to station" tests

This commit is contained in:
rubidium
2009-01-10 09:51:14 +00:00
parent ece7d9a16f
commit 3d6c09b38d
6 changed files with 67 additions and 64 deletions

View File

@@ -273,7 +273,7 @@ CommandCost CmdBuildAircraft(TileIndex tile, uint32 flags, uint32 p1, uint32 p2,
if (!IsHangarTile(tile) || !IsTileOwner(tile, _current_company)) return CMD_ERROR;
/* Prevent building aircraft types at places which can't handle them */
if (!CanAircraftUseStation(p1, tile)) return CMD_ERROR;
if (!CanVehicleUseStation(p1, GetStationByTile(tile))) return CMD_ERROR;
/* Allocate 2 or 3 vehicle structs, depending on type
* vl[0] = aircraft, vl[1] = shadow, [vl[2] = rotor] */