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:
parent
a0473ad24b
commit
01b1e20d8a
@ -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
|
||||
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user