Bugfix: if a kart ahead of the leader is eliminated,

it would have an invalid position (#1), and this would
result in duplicated positions later.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2697 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2008-12-16 13:18:46 +00:00
parent a6a4d2b7a8
commit ede429b79c

View File

@ -71,6 +71,9 @@ void FollowTheLeaderRace::countdownReachedZero()
} // kart_number==m_kart.size() } // kart_number==m_kart.size()
else else
{ {
// In case that the kart on position 1 was removed, we have to set
// the correct position (which equals the remaining number of karts).
m_kart[kart_number]->setPosition(getCurrentNumKarts());
removeKart(kart_number); removeKart(kart_number);
} }