fix rfc for achievements when no default profile is selected
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/uni@13685 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
99e7b565bc
commit
c775662e4a
@ -57,7 +57,6 @@ AchievementsManager::AchievementsManager()
|
||||
void AchievementsManager::init()
|
||||
{
|
||||
parseConfigFile();
|
||||
updateCurrentPlayer();
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <stdio.h>
|
||||
#include <iostream>
|
||||
|
||||
#include "achievements/achievements_manager.hpp"
|
||||
#include "audio/sfx_base.hpp"
|
||||
#include "audio/sfx_manager.hpp"
|
||||
#include "config/player.hpp"
|
||||
@ -421,6 +422,15 @@ void UnlockManager::updateActiveChallengeList()
|
||||
getCurrentSlot()->computeActive();
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void UnlockManager::setCurrentSlot(std::string slotid)
|
||||
{
|
||||
m_current_game_slot = slotid;
|
||||
AchievementsManager::get()->updateCurrentPlayer();
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void UnlockManager::findWhatWasUnlocked(int points_before, int points_now,
|
||||
|
@ -82,8 +82,7 @@ public:
|
||||
}
|
||||
|
||||
/** \param slotid name of the player */
|
||||
void setCurrentSlot(std::string slotid) { m_current_game_slot = slotid; }
|
||||
|
||||
void setCurrentSlot(std::string slotid);
|
||||
void findWhatWasUnlocked(int pointsBefore, int pointsNow,
|
||||
std::vector<std::string>& tracks,
|
||||
std::vector<std::string>& gps);
|
||||
|
@ -1192,6 +1192,7 @@ void initRest()
|
||||
// a race condition can be introduced resulting in a crash).
|
||||
INetworkHttp::get()->startNetworkThread();
|
||||
Online::HTTPManager::get()->startNetworkThread();
|
||||
AchievementsManager::get()->init();
|
||||
music_manager = new MusicManager();
|
||||
sfx_manager = new SFXManager();
|
||||
// The order here can be important, e.g. KartPropertiesManager needs
|
||||
@ -1524,8 +1525,6 @@ int main(int argc, char *argv[] )
|
||||
// Go straight to the race
|
||||
StateManager::get()->enterGameState();
|
||||
}
|
||||
AchievementsManager::get()->init();
|
||||
|
||||
|
||||
// If an important news message exists it is shown in a popup dialog.
|
||||
const core::stringw important_message =
|
||||
|
Loading…
x
Reference in New Issue
Block a user