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

Function GetNumTerminals

src/aircraft_cmd.cpp:1992–1999  ·  view source on GitHub ↗

* Get the number of terminals at the airport. * @param apc Airport description. * @return Number of terminals. */

Source from the content-addressed store, hash-verified

1990 * @return Number of terminals.
1991 */
1992static uint GetNumTerminals(const AirportFTAClass *apc)
1993{
1994 uint num = 0;
1995
1996 for (uint i = apc->terminals[0]; i > 0; i--) num += apc->terminals[i];
1997
1998 return num;
1999}
2000
2001/**
2002 * Find a free terminal, and assign it if available.

Callers 1

AirportFindFreeTerminalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected