Fixed compiler warnings and comments.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11732 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
3a6133f6d6
commit
68711524bf
@ -636,7 +636,7 @@ void LinearWorld::updateRacePosition()
|
|||||||
|
|
||||||
int p = 1 ;
|
int p = 1 ;
|
||||||
|
|
||||||
const int my_id = kart->getWorldKartId();
|
const unsigned int my_id = kart->getWorldKartId();
|
||||||
const float my_distance = m_kart_info[my_id].m_overall_distance;
|
const float my_distance = m_kart_info[my_id].m_overall_distance;
|
||||||
|
|
||||||
// Count karts ahead of the current kart, i.e. kart that are
|
// Count karts ahead of the current kart, i.e. kart that are
|
||||||
@ -648,9 +648,11 @@ void LinearWorld::updateRacePosition()
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
// If the other kart has:
|
// If the other kart has:
|
||||||
// - finished the race, or is ahead, or has the same distance
|
// - finished the race (but this kart hasn't)
|
||||||
// but started earlier, it is ahead --> increase position
|
// - or is ahead
|
||||||
if(!kart->hasFinishedRace() && m_karts[j]->hasFinishedRace() ||
|
// - or has the same distance (very unlikely) but started earlier
|
||||||
|
// it is ahead --> increase position
|
||||||
|
if((!kart->hasFinishedRace() && m_karts[j]->hasFinishedRace()) ||
|
||||||
m_kart_info[j].m_overall_distance > my_distance ||
|
m_kart_info[j].m_overall_distance > my_distance ||
|
||||||
(m_kart_info[j].m_overall_distance == my_distance &&
|
(m_kart_info[j].m_overall_distance == my_distance &&
|
||||||
m_karts[j]->getInitialPosition()<kart->getInitialPosition() ) )
|
m_karts[j]->getInitialPosition()<kart->getInitialPosition() ) )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user