Don't tell about unlocked karts/tracks when they are unlocked globally

This commit is contained in:
Deve 2018-11-12 00:44:05 +01:00
parent be92acf0ab
commit 0128a729a0
2 changed files with 7 additions and 0 deletions

View File

@ -253,6 +253,9 @@ void UnlockManager::findWhatWasUnlocked(int points_before, int points_now,
std::vector<std::string>& karts,
std::vector<const ChallengeData*>& unlocked)
{
if (UserConfigParams::m_unlock_everything > 0)
return;
ChallengeData* c = NULL;
for (AllChallengesType::iterator it = m_all_challenges.begin();

View File

@ -24,6 +24,7 @@
#include "challenges/challenge_data.hpp"
#include "challenges/unlock_manager.hpp"
#include "config/player_manager.hpp"
#include "config/user_config.hpp"
#include "graphics/central_settings.hpp"
#include "graphics/sp/sp_base.hpp"
#include "graphics/sp/sp_mesh.hpp"
@ -197,6 +198,9 @@ void FeatureUnlockedCutScene::
findWhatWasUnlocked(RaceManager::Difficulty difficulty,
std::vector<const ChallengeData*>& unlocked)
{
if (UserConfigParams::m_unlock_everything > 0)
return;
PlayerProfile *player = PlayerManager::getCurrentPlayer();
// The number of points is updated before this function is called