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

Method die

src/Savegame/Soldier.cpp:557–572  ·  view source on GitHub ↗

* Kills the soldier in the Geoscape. * @param death Pointer to death data. */

Source from the content-addressed store, hash-verified

555 * @param death Pointer to death data.
556 */
557void Soldier::die(SoldierDeath *death)
558{
559 delete _death;
560 _death = death;
561
562 // Clean up associations
563 _craft = 0;
564 _psiTraining = false;
565 _recentlyPromoted = false;
566 _recovery = 0;
567 for (std::vector<EquipmentLayoutItem*>::iterator i = _equipmentLayout.begin(); i != _equipmentLayout.end(); ++i)
568 {
569 delete *i;
570 }
571 _equipmentLayout.clear();
572}
573
574/**
575 * Calculates the soldier's statString.

Callers 2

prepareDebriefingMethod · 0.80
time5SecondsMethod · 0.80

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected