Fixed incorrect animation in case of a GP challenge (#815).

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12097 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2012-11-27 22:01:00 +00:00
parent caaccaf9c3
commit 70afa12d49

View File

@ -780,7 +780,10 @@ void Kart::finishedRace(float time)
m_controller));
GameSlot *slot = unlock_manager->getCurrentSlot();
const Challenge *challenge = slot->getCurrentChallenge();
if(challenge)
// In case of a GP challenge don't make the end animation depend
// on if the challenge is fulfilled
if(challenge && !challenge->getData()->getMajorMode()
==RaceManager::MAJOR_MODE_GRAND_PRIX)
{
if(challenge->getData()->isChallengeFulfilled())
m_kart_model->setAnimation(KartModel::AF_WIN_START);