diff --git a/src/race/race_manager.cpp b/src/race/race_manager.cpp index 537c7601b..a4552d442 100644 --- a/src/race/race_manager.cpp +++ b/src/race/race_manager.cpp @@ -265,7 +265,19 @@ void RaceManager::startNextRace() else if(m_minor_mode==MINOR_MODE_QUICK_RACE || m_minor_mode==MINOR_MODE_TIME_TRIAL) new StandardRace(); else if(m_minor_mode==MINOR_MODE_3_STRIKES) new ThreeStrikesBattle(); else{ fprintf(stderr,"Could not create given race mode\n"); assert(0); } - + + // Save the current score and set last time to zero. This is necessary + // if someone presses esc after finishing a gp, and selects restart: + // The race is rerun, and the points and scores get reset ... but if + // a kart hasn't finished the race at this stage, last_score and time + // would be undefined. + for(int i=0; igetWorldKartId(); - // In follow the leader mode, kart 0 does not get any points, - // so the position of each kart is actually one better --> decrease pos int pos = kart->getPosition(); assert(pos-1 >= 0);