Fixed crash (when some things are actually locked).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12663 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
10317fe33c
commit
9773df37ee
@ -181,6 +181,9 @@ public:
|
||||
/** Returns if this challenge is a grand prix. */
|
||||
bool isGrandPrix() const { return m_mode == CM_GRAND_PRIX; }
|
||||
// ------------------------------------------------------------------------
|
||||
/** Returns if this challenge is a grand prix. */
|
||||
bool isSingleRace() const { return m_mode == CM_SINGLE_RACE; }
|
||||
// ------------------------------------------------------------------------
|
||||
/** Returns the challenge mode of this challenge. */
|
||||
ChallengeModeType getMode() const { return m_mode; }
|
||||
// ------------------------------------------------------------------------
|
||||
|
@ -127,10 +127,15 @@ void GameSlot::computeActive()
|
||||
{
|
||||
if (m_points < i->second->getData()->getNumTrophies())
|
||||
{
|
||||
if (i->second->getData()->getTrackId().size() > 0)
|
||||
if (i->second->getData()->isSingleRace())
|
||||
m_locked_features[i->second->getData()->getTrackId()] = true;
|
||||
else if (i->second->getData()->getGPId().size() > 0)
|
||||
else if (i->second->getData()->isGrandPrix())
|
||||
m_locked_features[i->second->getData()->getGPId()] = true;
|
||||
else
|
||||
{
|
||||
// FIXME when more challenge types are implemented.
|
||||
assert(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user