Skip to content

Commit

Permalink
Remove all parts of big unit
Browse files Browse the repository at this point in the history
  • Loading branch information
Yankes committed Jan 15, 2017
1 parent a3313b3 commit 3b8032f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Savegame/SavedBattleGame.cpp
Expand Up @@ -1878,13 +1878,15 @@ void SavedBattleGame::reviveUnconsciousUnits(bool noTU)
*/
void SavedBattleGame::removeUnconsciousBodyItem(BattleUnit *bu)
{
int size = bu->getArmor()->getSize();
size *= size;
// remove the unconscious body item corresponding to this unit
for (std::vector<BattleItem*>::iterator it = getItems()->begin(); it != getItems()->end(); )
{
if ((*it)->getUnit() == bu)
{
removeItem((*it));
break;
if (--size == 0) break;
}
++it;
}
Expand Down

0 comments on commit 3b8032f

Please sign in to comment.