mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix: Finish score should always show the fastest time
This commit is contained in:
parent
bf0e67a34a
commit
79d29b1e31
|
@ -119,6 +119,8 @@ void CPlayer::Reset()
|
|||
m_DND = false;
|
||||
|
||||
m_LastPause = 0;
|
||||
m_Score = -9999;
|
||||
m_HasFinishScore = false
|
||||
|
||||
// Variable initialized:
|
||||
m_Last_Team = 0;
|
||||
|
|
|
@ -595,7 +595,10 @@ void CGameTeams::OnFinish(CPlayer* Player)
|
|||
|
||||
int TTime = 0 - (int)Time;
|
||||
if (Player->m_Score < TTime || !Player->m_HasFinishScore)
|
||||
{
|
||||
Player->m_Score = TTime;
|
||||
Player->m_HasFinishScore = true;
|
||||
}
|
||||
}
|
||||
|
||||
void CGameTeams::OnCharacterSpawn(int ClientID)
|
||||
|
|
Loading…
Reference in a new issue