Fixed incomplete merge.

This commit is contained in:
hiker
2014-02-11 07:41:35 +11:00
parent 8fc76729f9
commit 0228b82ef4

View File

@@ -156,7 +156,7 @@ Track::~Track()
unsigned int Track::getNumOfCompletedChallenges()
{
unsigned int unlocked_challenges = 0;
GameSlot* slot = unlock_manager->getCurrentSlot();
PlayerProfile *player = PlayerManager::get()->getCurrentPlayer();
for (unsigned int i=0; i<m_challenges.size(); i++)
{
if (m_challenges[i].m_challenge_id == "tutorial")
@@ -164,7 +164,7 @@ unsigned int Track::getNumOfCompletedChallenges()
unlocked_challenges++;
continue;
}
if (slot->getChallenge(m_challenges[i].m_challenge_id)
if (player->getChallenge(m_challenges[i].m_challenge_id)
->isSolvedAtAnyDifficulty())
{
unlocked_challenges++;
@@ -986,25 +986,6 @@ bool Track::loadMainTrack(const XMLNode &root)
}
else if (condition == "allchallenges")
{
<<<<<<< HEAD
unsigned int unlocked_challenges = 0;
PlayerProfile *player = PlayerManager::get()->getCurrentPlayer();
for (unsigned int c=0; c<m_challenges.size(); c++)
{
if (m_challenges[c].m_challenge_id == "tutorial")
{
unlocked_challenges++;
continue;
}
if (player->getChallenge(m_challenges[c].m_challenge_id)
->isSolvedAtAnyDifficulty())
{
unlocked_challenges++;
}
}
=======
>>>>>>> upstream/master
// allow ONE unsolved challenge : the last one
if (getNumOfCompletedChallenges() < m_challenges.size() - 1)
continue;
@@ -1022,25 +1003,6 @@ bool Track::loadMainTrack(const XMLNode &root)
}
else if (neg_condition == "allchallenges")
{
<<<<<<< HEAD
unsigned int unlocked_challenges = 0;
PlayerProfile *player = PlayerManager::get()->getCurrentPlayer();
for (unsigned int c=0; c<m_challenges.size(); c++)
{
if (m_challenges[c].m_challenge_id == "tutorial")
{
unlocked_challenges++;
continue;
}
if (player->getChallenge(m_challenges[c].m_challenge_id)
->isSolvedAtAnyDifficulty())
{
unlocked_challenges++;
}
}
=======
>>>>>>> upstream/master
// allow ONE unsolved challenge : the last one
if (getNumOfCompletedChallenges() >= m_challenges.size() - 1)
continue;