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

Method destroy

game/state/battle/battleunit.cpp:140–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140void BattleUnit::destroy()
141{
142 targetUnit.clear();
143 focusUnit.clear();
144 focusedByUnits.clear();
145 psiTarget.clear();
146 brainSucker.clear();
147
148 if (agent)
149 {
150 agent->unit.clear();
151 }
152 visibleUnits.clear();
153 visibleEnemies.clear();
154 aiList.aiList.clear();
155
156 for (auto &m : missions)
157 {
158 m->targetUnit.clear();
159 }
160}
161
162void BattleUnit::removeFromSquad(Battle &battle)
163{

Callers 2

~BattleMethod · 0.45
finishBattleMethod · 0.45

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected