MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / AircraftEventHandler_EndLanding

Function AircraftEventHandler_EndLanding

src/aircraft_cmd.cpp:1731–1745  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1729}
1730
1731static void AircraftEventHandler_EndLanding(Aircraft *v, const AirportFTAClass *apc)
1732{
1733 /* next block busy, don't do a thing, just wait */
1734 if (AirportHasBlock(v, &apc->layout[v->pos], apc)) return;
1735
1736 /* if going to terminal (OT_GOTO_STATION) choose one
1737 * 1. in case all terminals are busy AirportFindFreeTerminal() returns false or
1738 * 2. not going for terminal (but depot, no order),
1739 * --> get out of the way to the hangar. */
1740 if (v->current_order.IsType(OT_GOTO_STATION)) {
1741 if (AirportFindFreeTerminal(v, apc)) return;
1742 }
1743 v->state = HANGAR;
1744
1745}
1746
1747static void AircraftEventHandler_HeliEndLanding(Aircraft *v, const AirportFTAClass *apc)
1748{

Callers

nothing calls this directly

Calls 3

AirportHasBlockFunction · 0.85
AirportFindFreeTerminalFunction · 0.85
IsTypeMethod · 0.80

Tested by

no test coverage detected