Make sure that karts that have already finished the race (and are

driven by the computer) do not generate any 'fastest lap' messages
anymore (see bug 3061466).


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5942 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2010-09-09 01:46:05 +00:00
parent 18b7bd5068
commit 5abf327e13

View File

@ -260,6 +260,12 @@ void LinearWorld::newLap(unsigned int kart_index)
{
KartInfo &kart_info = m_kart_info[kart_index];
Kart *kart = m_karts[kart_index];
// Don't do anything if a kart that has already finished the race
// crosses the start line again. This avoids 'fastest lap' messages
// if the end controller does a fastest lap.
if(kart->hasFinishedRace()) return;
// Only increase the lap counter and set the new time if the
// kart hasn't already finished the race (otherwise the race_gui
// will begin another countdown).