MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / abortMission

Method abortMission

game/state/battle/battle.cpp:1968–1980  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1966}
1967
1968void Battle::abortMission(GameState &state)
1969{
1970 killStrandedUnits(state, currentPlayer);
1971 auto player = state.getPlayer();
1972 for (auto &u : units)
1973 {
1974 if (u.second->owner == u.second->agent->owner && u.second->owner == player &&
1975 !u.second->isDead() && !u.second->retreated)
1976 {
1977 u.second->retreat(state);
1978 }
1979 }
1980}
1981
1982void Battle::checkMissionEnd(GameState &state, bool retreated, bool forceReCheck)
1983{

Callers 1

eventOccurredMethod · 0.80

Calls 3

getPlayerMethod · 0.80
retreatMethod · 0.80
isDeadMethod · 0.45

Tested by

no test coverage detected