From 04ba1f96ae9aa8c40089a83f786d0abc348ee2ee Mon Sep 17 00:00:00 2001 From: auria Date: Sun, 11 Apr 2010 19:28:53 +0000 Subject: [PATCH] Added checks to catch the ranking bug much earlier (yay) git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5169 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/modes/linear_world.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/modes/linear_world.cpp b/src/modes/linear_world.cpp index 055f4a3d4..1758666b5 100644 --- a/src/modes/linear_world.cpp +++ b/src/modes/linear_world.cpp @@ -210,8 +210,7 @@ void LinearWorld::update(float delta) } #ifdef DEBUG - // FIXME: Debug output in case that the double position error - // occurs again. It can most likely be removed. + // FIXME: Debug output in case that the double position error occurs again. int pos_used[10]; for(int i=0; i<10; i++) pos_used[i]=-99; for(unsigned int i=0; iisEliminated() || kart->hasFinishedRace()) continue; + if(kart->isEliminated() || kart->hasFinishedRace()) + { +#ifdef DEBUG + rank_used[kart->getPosition()] = true; +#endif + continue; + } KartInfo& kart_info = m_kart_info[i]; int p = 1 ; @@ -666,6 +671,7 @@ void LinearWorld::updateRacePosition() } std::cerr << " --> And " << kart->getIdent() << " is being set at rank " << p << std::endl; + history->Save(); assert(false); } rank_used[p] = true;