mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
fixed negative download speed. Closes #473
This commit is contained in:
parent
0c119ba99b
commit
c2ad73cfe8
|
@ -977,7 +977,7 @@ int CMenus::Render()
|
|||
|
||||
// update download speed
|
||||
float Diff = (Client()->MapDownloadAmount()-m_DownloadLastCheckSize)/1024.0f;
|
||||
m_DownloadSpeed = (m_DownloadSpeed*(1.0f-(1.0f/m_DownloadSpeed))) + (Diff*(1.0f/m_DownloadSpeed));
|
||||
m_DownloadSpeed = absolute((m_DownloadSpeed*(1.0f-(1.0f/m_DownloadSpeed))) + (Diff*(1.0f/m_DownloadSpeed)));
|
||||
m_DownloadLastCheckTime = Now;
|
||||
m_DownloadLastCheckSize = Client()->MapDownloadAmount();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue