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

Method setObjectiveDestroyed

src/Savegame/SavedBattleGame.cpp:1062–1071  ·  view source on GitHub ↗

* Sets whether the objective is destroyed. * @param flag True if the objective is destroyed. */

Source from the content-addressed store, hash-verified

1060 * @param flag True if the objective is destroyed.
1061 */
1062void SavedBattleGame::setObjectiveDestroyed(bool flag)
1063{
1064 _objectiveDestroyed = flag;
1065 if (flag && Options::battleAutoEnd)
1066 {
1067 setSelectedUnit(0);
1068 _battleState->getBattleGame()->cancelCurrentAction(true);
1069 _battleState->getBattleGame()->requestEndTurn();
1070 }
1071}
1072
1073/**
1074 * Returns whether the objective is detroyed.

Callers 2

hitMethod · 0.80
explodeMethod · 0.80

Calls 3

cancelCurrentActionMethod · 0.80
requestEndTurnMethod · 0.80
getBattleGameMethod · 0.45

Tested by

no test coverage detected