Solving the 'hard' challenge now also marks as obtained the 'medium' and 'easy' trophies
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11047 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
1b85ced4f9
commit
1be96dcff3
@ -78,6 +78,18 @@ void Challenge::load(const XMLNode* challengesNode)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
void Challenge::setSolved(RaceManager::Difficulty d)
|
||||
{
|
||||
// solve not only the current difficulty but all those before
|
||||
// e.g. if you solved hard then you also get easy
|
||||
for (int curr = 0; curr <= d; curr++)
|
||||
{
|
||||
m_state[curr] = CH_SOLVED;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
const wchar_t* boolstr(bool b)
|
||||
{
|
||||
|
@ -73,7 +73,7 @@ public:
|
||||
// ------------------------------------------------------------------------
|
||||
bool isActive(RaceManager::Difficulty d) const {return m_state[d]==CH_ACTIVE; }
|
||||
// ------------------------------------------------------------------------
|
||||
void setSolved(RaceManager::Difficulty d) {m_state[d] = CH_SOLVED; }
|
||||
void setSolved(RaceManager::Difficulty d);
|
||||
// ------------------------------------------------------------------------
|
||||
void setActive(RaceManager::Difficulty d) {m_state[d] = CH_ACTIVE; }
|
||||
// ------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user