diff --git a/src/challenges/challenge_data.hpp b/src/challenges/challenge_data.hpp index e1586dc0c..7912a06f1 100644 --- a/src/challenges/challenge_data.hpp +++ b/src/challenges/challenge_data.hpp @@ -57,7 +57,6 @@ public: }; // UnlockableFeature // ------------------------------------------------------------------------ -private: /** The various types of challenges that we support, which esp. determine * when a challenge is tested if it is fulfilled. For now we have GP * (a GP challenge, tested at the end of a GP), Race (tested at the @@ -74,6 +73,9 @@ private: CM_ANY }; + +private: + /** The challenge mode of this challenge. */ ChallengeModeType m_mode; diff --git a/src/challenges/unlock_manager.cpp b/src/challenges/unlock_manager.cpp index ac9efd374..6d9d730e5 100644 --- a/src/challenges/unlock_manager.cpp +++ b/src/challenges/unlock_manager.cpp @@ -434,12 +434,12 @@ void UnlockManager::findWhatWasUnlocked(int points_before, int points_now, if (c->getNumTrophies() > points_before && c->getNumTrophies() <= points_now ) { - if (c->getTrackId() != "") + if (c->getMode() == ChallengeData::CM_SINGLE_RACE && c->getTrackId() != "") { if (!getCurrentSlot()->isLocked(c->getTrackId())) tracks.push_back(c->getTrackId()); } - else if (c->getGPId() != "") + else if (c->getMode() == ChallengeData::CM_GRAND_PRIX && c->getGPId() != "") { if (!getCurrentSlot()->isLocked(c->getGPId())) gps.push_back(c->getGPId());