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:
auria
2008-10-01 00:46:00 +00:00
parent 11bec6a781
commit 1c7c08315a
2 changed files with 6 additions and 4 deletions

View File

@@ -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
//-----------------------------------------------------------------------------

View File

@@ -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