From c51b746097a55c6acabdde9310cbb9ad1e36cc4e Mon Sep 17 00:00:00 2001 From: auria Date: Sun, 17 Feb 2013 20:25:26 +0000 Subject: [PATCH] Validate AI power in challenge git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12509 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/challenges/challenge_data.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/challenges/challenge_data.cpp b/src/challenges/challenge_data.cpp index 7415ad7b6..96f42699c 100644 --- a/src/challenges/challenge_data.cpp +++ b/src/challenges/challenge_data.cpp @@ -438,6 +438,13 @@ bool ChallengeData::isChallengeFulfilled() const } // too slow if (m_time[d] > 0.0f && kart->getFinishTime() > m_time[d]) return false; + + if (m_ai_superpower[d] != RaceManager::SUPERPOWER_NONE && + race_manager->getAISuperPower() != m_ai_superpower[d]) + { + return false; + } + return true; } // isChallengeFulfilled