| 1745 | } |
| 1746 | |
| 1747 | static void AircraftEventHandler_HeliEndLanding(Aircraft *v, const AirportFTAClass *apc) |
| 1748 | { |
| 1749 | /* next block busy, don't do a thing, just wait */ |
| 1750 | if (AirportHasBlock(v, &apc->layout[v->pos], apc)) return; |
| 1751 | |
| 1752 | /* if going to helipad (OT_GOTO_STATION) choose one. If airport doesn't have helipads, choose terminal |
| 1753 | * 1. in case all terminals/helipads are busy (AirportFindFreeHelipad() returns false) or |
| 1754 | * 2. not going for terminal (but depot, no order), |
| 1755 | * --> get out of the way to the hangar IF there are terminals on the airport. |
| 1756 | * --> else TAKEOFF |
| 1757 | * the reason behind this is that if an airport has a terminal, it also has a hangar. Airplanes |
| 1758 | * must go to a hangar. */ |
| 1759 | if (v->current_order.IsType(OT_GOTO_STATION)) { |
| 1760 | if (AirportFindFreeHelipad(v, apc)) return; |
| 1761 | } |
| 1762 | v->state = Station::Get(v->targetairport)->airport.HasHangar() ? HANGAR : HELITAKEOFF; |
| 1763 | } |
| 1764 | |
| 1765 | /** |
| 1766 | * Signature of the aircraft handler function. |
nothing calls this directly
no test coverage detected