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

Method btnStandardClick

src/Geoscape/DogfightState.cpp:1353–1370  ·  view source on GitHub ↗

* Switches to Standard mode (minimum weapon range). * @param action Pointer to an action. */

Source from the content-addressed store, hash-verified

1351 * @param action Pointer to an action.
1352 */
1353void DogfightState::btnStandardClick(Action *)
1354{
1355 if (!_ufo->isCrashed() && !_craft->isDestroyed() && !_ufoBreakingOff)
1356 {
1357 _end = false;
1358 setStatus("STR_STANDARD_ATTACK");
1359 if (_craft->getRules()->getWeapons() > 0 && _craft->getWeapons()->at(0) != 0)
1360 {
1361 _w1Timer->setInterval(_craft->getWeapons()->at(0)->getRules()->getStandardReload() * _timeScale);
1362 }
1363 if (_craft->getRules()->getWeapons() > 1 && _craft->getWeapons()->at(1) != 0)
1364 {
1365 _w2Timer->setInterval(_craft->getWeapons()->at(1)->getRules()->getStandardReload() * _timeScale);
1366 }
1367 maximumDistance();
1368 _ufoEscapeTimer->start();
1369 }
1370}
1371
1372/**
1373 * Switches to Aggressive mode (minimum range).

Callers

nothing calls this directly

Calls 7

isCrashedMethod · 0.80
setIntervalMethod · 0.80
getStandardReloadMethod · 0.80
isDestroyedMethod · 0.45
getWeaponsMethod · 0.45
getRulesMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected