* Find a free helipad, and assign it if available. * @param v Aircraft to handle. * @param apc Airport state machine. * @return Found a free helipad and assigned it. */
| 2058 | * @return Found a free helipad and assigned it. |
| 2059 | */ |
| 2060 | static bool AirportFindFreeHelipad(Aircraft *v, const AirportFTAClass *apc) |
| 2061 | { |
| 2062 | /* if an airport doesn't have helipads, use terminals */ |
| 2063 | if (apc->num_helipads == 0) return AirportFindFreeTerminal(v, apc); |
| 2064 | |
| 2065 | /* only 1 helicoptergroup, check all helipads |
| 2066 | * The blocks for helipads start after the last terminal (MAX_TERMINALS) */ |
| 2067 | return FreeTerminal(v, MAX_TERMINALS, apc->num_helipads + MAX_TERMINALS); |
| 2068 | } |
| 2069 | |
| 2070 | /** |
| 2071 | * Handle the 'dest too far' flag and the corresponding news message for aircraft. |
no test coverage detected