Don't announce fort magma as unlocked when its not
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12117 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
8d782bc7ee
commit
bbf4d7eab5
@ -410,15 +410,23 @@ void UnlockManager::updateActiveChallengeList()
|
||||
void UnlockManager::findWhatWasUnlocked(int pointsBefore, int pointsNow,
|
||||
std::vector<std::string>& tracks,
|
||||
std::vector<std::string>& gps)
|
||||
{printf("pointsBefore : %i, pointsNow: %i\n", pointsBefore, pointsNow);
|
||||
{
|
||||
for (AllChallengesType::iterator it = m_all_challenges.begin();
|
||||
it != m_all_challenges.end(); it++)
|
||||
{
|
||||
ChallengeData* c = it->second;
|
||||
if (c->getNumTrophies() > pointsBefore && c->getNumTrophies() <= pointsNow)
|
||||
{
|
||||
if (c->getTrackId() != "") tracks.push_back(c->getTrackId());
|
||||
else if (c->getGPId() != "") gps.push_back(c->getGPId());
|
||||
if (c->getTrackId() != "")
|
||||
{
|
||||
if (!getCurrentSlot()->isLocked(c->getTrackId()))
|
||||
tracks.push_back(c->getTrackId());
|
||||
}
|
||||
else if (c->getGPId() != "")
|
||||
{
|
||||
if (!getCurrentSlot()->isLocked(c->getGPId()))
|
||||
gps.push_back(c->getGPId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -149,7 +149,8 @@ void FeatureUnlockedCutScene::findWhatWasUnlocked(RaceManager::Difficulty diffic
|
||||
|
||||
std::vector<std::string> tracks;
|
||||
std::vector<std::string> gps;
|
||||
|
||||
|
||||
unlock_manager->updateActiveChallengeList();
|
||||
unlock_manager->findWhatWasUnlocked(pointsBefore, pointsNow, tracks, gps);
|
||||
|
||||
for (unsigned int i = 0; i < tracks.size(); i++)
|
||||
|
Loading…
x
Reference in New Issue
Block a user