Skip to content

Commit

Permalink
Manual promotion refactor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MeridianOXC committed Dec 3, 2023
1 parent ddfe762 commit ae90c99
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Savegame/RankCount.cpp
Expand Up @@ -48,11 +48,15 @@ int RankCountBase::getTotalSoldiers() const
*/
RankCount::RankCount(const std::vector<Soldier*> soldiers)
{
_totalSoldiers = 0;
for (auto* soldier : soldiers)
{
_rankCounts[soldier->getRank()]++;
if (soldier->getRules()->getAllowPromotion())
{
_rankCounts[soldier->getRank()]++;
_totalSoldiers++;
}
}
_totalSoldiers = soldiers.size();
}

/**
Expand Down

0 comments on commit ae90c99

Please sign in to comment.