Fix #2249 (show points and points increasing in a FTL GP).
This commit is contained in:
parent
6ada5a0666
commit
d27ba5f6fe
@ -766,15 +766,20 @@ void RaceResultGUI::renderGlobal(float dt)
|
|||||||
{
|
{
|
||||||
WorldWithRank *wwr = dynamic_cast<WorldWithRank*>(World::getWorld());
|
WorldWithRank *wwr = dynamic_cast<WorldWithRank*>(World::getWorld());
|
||||||
assert(wwr);
|
assert(wwr);
|
||||||
|
int most_points;
|
||||||
|
if (race_manager->getMinorMode() == RaceManager::MINOR_MODE_FOLLOW_LEADER)
|
||||||
|
most_points = wwr->getScoreForPosition(2);
|
||||||
|
else
|
||||||
|
most_points = wwr->getScoreForPosition(1);
|
||||||
ri->m_current_displayed_points +=
|
ri->m_current_displayed_points +=
|
||||||
dt*wwr->getScoreForPosition(1) / m_time_for_points;
|
dt*most_points / m_time_for_points;
|
||||||
if (ri->m_current_displayed_points > ri->m_new_overall_points)
|
if (ri->m_current_displayed_points > ri->m_new_overall_points)
|
||||||
{
|
{
|
||||||
ri->m_current_displayed_points =
|
ri->m_current_displayed_points =
|
||||||
(float)ri->m_new_overall_points;
|
(float)ri->m_new_overall_points;
|
||||||
}
|
}
|
||||||
ri->m_new_points -=
|
ri->m_new_points -=
|
||||||
dt*wwr->getScoreForPosition(1) / m_time_for_points;
|
dt*most_points / m_time_for_points;
|
||||||
if (ri->m_new_points < 0)
|
if (ri->m_new_points < 0)
|
||||||
ri->m_new_points = 0;
|
ri->m_new_points = 0;
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user