Fixed (at least one) bug in new race gui which caused battle mode not to
work anymore (battle modes don't have distance along track). git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5862 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
81d43ec465
commit
548ebab371
@ -432,8 +432,16 @@ void RaceGUI::drawGlobalPlayerIcons(const KartIconDisplayInfo* info)
|
||||
|
||||
//x,y is the target position
|
||||
int lap = info[kart->getWorldKartId()].lap;
|
||||
float distance=
|
||||
world->getDistanceDownTrackForKart(kart_id)
|
||||
|
||||
// In battle mode there is no distance along track etc.
|
||||
if(race_manager->getMinorMode()==RaceManager::MINOR_MODE_3_STRIKES)
|
||||
{
|
||||
x = x_base;
|
||||
y = previous_y+ICON_PLAYER_WIDTH+2;
|
||||
}
|
||||
else
|
||||
{
|
||||
float distance = world->getDistanceDownTrackForKart(kart_id)
|
||||
+ world->getTrack()->getTrackLength()*lap;
|
||||
if (previous_distance-distance<m_dist_show_overlap)
|
||||
{
|
||||
@ -450,9 +458,11 @@ void RaceGUI::drawGlobalPlayerIcons(const KartIconDisplayInfo* info)
|
||||
x=x_base;
|
||||
y=previous_y+ICON_PLAYER_WIDTH+2;
|
||||
}
|
||||
previous_distance=distance;
|
||||
} // not three-strike-battle
|
||||
previous_x=x;//save coord of the previous kart in list
|
||||
previous_y=y;
|
||||
previous_distance=distance;
|
||||
|
||||
|
||||
//initialize m_previous_icons_position
|
||||
if (m_previous_icons_position.size()<kart_amount)
|
||||
|
Loading…
Reference in New Issue
Block a user