Don't save highscores for eliminated karts, fix #3560

This commit is contained in:
Alayan-stk-2 2018-11-18 03:25:38 +01:00 committed by GitHub
parent 3363782407
commit 853a08d398
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1160,6 +1160,7 @@ void World::updateHighscores(int* best_highscore_rank)
if(!m_karts[index[pos]]->getController()->isLocalPlayerController()) if(!m_karts[index[pos]]->getController()->isLocalPlayerController())
continue; continue;
if (!m_karts[index[pos]]->hasFinishedRace()) continue; if (!m_karts[index[pos]]->hasFinishedRace()) continue;
if (m_karts[index[pos]]->isEliminated()) continue;
assert(index[pos] < m_karts.size()); assert(index[pos] < m_karts.size());
Kart *k = (Kart*)m_karts[index[pos]].get(); Kart *k = (Kart*)m_karts[index[pos]].get();