BugFix: Re-instated m_finish_delay_start_time and associated code.

Simplification broke the final lap split times for AI karts, making them 
negative and resulting in false overall race times.


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@1954 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
scifly 2008-05-20 10:01:26 +00:00
parent a0473ad24b
commit 01b1e20d8a
2 changed files with 4 additions and 2 deletions

View File

@ -465,7 +465,8 @@ void World::updateRaceStatus(float dt)
{
m_clock += dt;
// Nothing more to do if delay time is not over yet
if(m_clock < TIME_DELAY_TILL_FINISH) return;
if(m_clock - m_finish_delay_start_time
< TIME_DELAY_TILL_FINISH) return;
m_phase = FINISH_PHASE;
estimateFinishTimes();
@ -498,7 +499,7 @@ void World::updateRaceStatus(float dt)
// Set delay mode to have time for camera animation, and
// to give the AI some time to get non-estimated timings
m_phase = DELAY_FINISH_PHASE;
m_clock = 0.0f;
m_finish_delay_start_time = m_clock;
}
} // updateRaceStatus

View File

@ -117,6 +117,7 @@ private:
Highscores* m_highscores;
Phase m_phase;
float m_clock;
float m_finish_delay_start_time;
int m_eliminated_karts; // number of eliminated karts
int m_eliminated_players; // number of eliminated players
std::vector<float>