MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / getFirstFreeDogfightSlot

Method getFirstFreeDogfightSlot

src/Geoscape/GeoscapeState.cpp:2108–2119  ·  view source on GitHub ↗

* Returns the first free dogfight slot. * @return free slot */

Source from the content-addressed store, hash-verified

2106 * @return free slot
2107 */
2108int GeoscapeState::getFirstFreeDogfightSlot()
2109{
2110 int slotNo = 1;
2111 for(std::list<DogfightState*>::iterator d = _dogfights.begin(); d != _dogfights.end(); ++d)
2112 {
2113 if ((*d)->getInterceptionNumber() == slotNo)
2114 {
2115 ++slotNo;
2116 }
2117 }
2118 return slotNo;
2119}
2120
2121/**
2122 * Handle base defense

Callers

nothing calls this directly

Calls 1

getInterceptionNumberMethod · 0.80

Tested by

no test coverage detected