1) Bugfix: solved challenges were not causing the corresponding

features to be unlocked when reading the configuration.
2) Some minor code cleanup.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@1675 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2008-03-27 11:51:01 +00:00
parent 1712d707b9
commit b1faf872b3
5 changed files with 7 additions and 5 deletions

View File

@ -20,7 +20,6 @@
#include <algorithm>
#include "challenges/all_tracks.hpp"
#include "world.hpp"
#include "unlock_manager.hpp"
AllTracks::AllTracks() : Challenge("alltracks", "All Tracks")
{

View File

@ -18,7 +18,6 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "challenges/challenge.hpp"
#include "unlock_manager.hpp"
Challenge::Challenge(std::string id, std::string name) :
m_state(CH_INACTIVE), m_Id(id), m_Name(name)

View File

@ -20,7 +20,6 @@
#include <algorithm>
#include "challenges/energy_math_class.hpp"
#include "world.hpp"
#include "unlock_manager.hpp"
EnergyMathClass::EnergyMathClass() : Challenge("energymathclass", "Collect Coins in Race track")
{

View File

@ -20,7 +20,6 @@
#include <algorithm>
#include "challenges/win_gotm_cup.hpp"
#include "world.hpp"
#include "unlock_manager.hpp"
#include "race_setup.hpp"
#include "race_manager.hpp"

View File

@ -92,7 +92,13 @@ void UnlockManager::computeActive()
{
// If a challenge is solved, nothing needs to be done
// --------------------------------------------------
if((i->second)->isSolved()) continue;
if((i->second)->isSolved())
{
// The constructor calls computeActive, which actually locks all features,
// so unlock them
unlockFeature(i->second);
continue;
}
// Otherwise lock the feature, and check if the challenge is active
// ----------------------------------------------------------------