started fixing time comparison at the end of a lap
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2315 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -331,6 +331,8 @@ void RaceGUI::drawPlayerIcons (const KartIconDisplayInfo* info)
|
||||
Material *last_players_gst = 0;
|
||||
|
||||
int bFirst = 1;
|
||||
glDisable(GL_CULL_FACE);
|
||||
|
||||
const unsigned int kart_amount = race_manager->getNumKarts();
|
||||
for(unsigned int i = 0; i < kart_amount ; i++)
|
||||
{
|
||||
@@ -401,8 +403,9 @@ void RaceGUI::drawPlayerIcons (const KartIconDisplayInfo* info)
|
||||
else
|
||||
font_race->PrintShadow("th", 13, x-7+17, y-4+17);
|
||||
|
||||
glEnable(GL_CULL_FACE);
|
||||
}
|
||||
} // next kart
|
||||
|
||||
glEnable(GL_CULL_FACE);
|
||||
} // drawPlayerIcons
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -367,7 +367,7 @@ KartIconDisplayInfo* LinearWorld::getKartsDisplayInfo(const RaceGUI* caller)
|
||||
time_of_leader=std::min(time_of_leader,lap_time);
|
||||
}
|
||||
|
||||
if(laps_of_leader>0 && // Display position during first lap
|
||||
if(laps_of_leader>0 && // Don't compare times when crossing the start line first
|
||||
(getTime() - getTimeAtLapForKart(kart->getWorldKartId())<5.0f || current_lap!=laps_of_leader) &&
|
||||
race_manager->raceHasLaps())
|
||||
{ // Display for 5 seconds
|
||||
@@ -402,7 +402,6 @@ KartIconDisplayInfo* LinearWorld::getKartsDisplayInfo(const RaceGUI* caller)
|
||||
{
|
||||
rank_info.g = rank_info.b = 1.0f-(float)kart_info.m_race_lap/((float)numLaps-1.0f);
|
||||
}
|
||||
|
||||
} // next kart
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user