fix no score when joining when using file based score

This commit is contained in:
fokkonaut 2019-04-10 21:40:31 +02:00 committed by GitHub
parent 11127f9344
commit b92607eb7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1031,7 +1031,7 @@ void CGameContext::OnClientEnter(int ClientID)
m_apPlayers[ClientID]->Respawn();
// init the player
Score()->PlayerData(ClientID)->Reset();
m_apPlayers[ClientID]->m_Score = -9999;
m_apPlayers[ClientID]->m_Score = (Score()->PlayerData(ClientID)->m_BestTime) ? Score()->PlayerData(ClientID)->m_BestTime : -9999;
// Can't set score here as LoadScore() is threaded, run it in
// LoadScoreThreaded() instead