BugFix: 1. Corrected the number of karts needed for the race track time
challenge when started from the challenge menu. 2. Added a check that 4 or more karts competed in the race track time challenge. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@1731 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
cb09ff873e
commit
7709270e7f
@ -35,7 +35,7 @@ void RaceTrackTime::setRace() const {
|
||||
race_manager->setTrack("race");
|
||||
race_manager->setDifficulty(RaceManager::RD_EASY);
|
||||
race_manager->setNumLaps(3);
|
||||
race_manager->setNumKarts(1);
|
||||
race_manager->setNumKarts(4);
|
||||
race_manager->setNumPlayers(1);
|
||||
} // setRace
|
||||
|
||||
@ -47,6 +47,7 @@ bool RaceTrackTime::raceFinished()
|
||||
Kart* kart=world->getPlayerKart(0);
|
||||
if(kart->getFinishTime()>75) return false; // too slow
|
||||
if(kart->getLap()!=3 ) return false; // wrong number of laps
|
||||
if(race_manager->getNumKarts()<4) return false; //not enough AI karts
|
||||
return true;
|
||||
} // raceFinished
|
||||
//-----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user