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

Method removeUnconsciousBodyItem

src/Savegame/SavedBattleGame.cpp:1401–1413  ·  view source on GitHub ↗

* Removes the body item that corresponds to the unit. */

Source from the content-addressed store, hash-verified

1399 * Removes the body item that corresponds to the unit.
1400 */
1401void SavedBattleGame::removeUnconsciousBodyItem(BattleUnit *bu)
1402{
1403 // remove the unconscious body item corresponding to this unit
1404 for (std::vector<BattleItem*>::iterator it = getItems()->begin(); it != getItems()->end(); )
1405 {
1406 if ((*it)->getUnit() == bu)
1407 {
1408 removeItem((*it));
1409 break;
1410 }
1411 ++it;
1412 }
1413}
1414
1415/**
1416 * Places units on the map. Handles large units that are placed on multiple tiles.

Callers 2

convertUnitMethod · 0.80
convertUnitToCorpseMethod · 0.80

Calls 1

getUnitMethod · 0.45

Tested by

no test coverage detected