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

Method createUnitInfo

game/ui/tileview/battleview.cpp:4467–4480  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4465}
4466
4467AgentInfo BattleView::createUnitInfo(int index)
4468{
4469 sp<Agent> a;
4470 if (battle.battleViewSquadIndex != -1 &&
4471 battle.forces[battle.currentPlayer].squads[battle.battleViewSquadIndex].getNumUnits() >
4472 index)
4473 {
4474 a = battle.forces[battle.currentPlayer]
4475 .squads[battle.battleViewSquadIndex]
4476 .units[index]
4477 ->agent;
4478 }
4479 return ControlGenerator::createAgentInfo(*state, a);
4480}
4481
4482void BattleView::updateUnitInfo(int index)
4483{

Callers

nothing calls this directly

Calls 1

getNumUnitsMethod · 0.80

Tested by

no test coverage detected