diff options
| author | oy <Tom_Adams@web.de> | 2012-04-20 22:11:41 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2013-02-24 17:34:02 +0100 |
| commit | 86708818e9012a59cb00f6d836000a5c72850195 (patch) | |
| tree | 2969251ff275b2662e4486b45bbb3049a56b52e2 /src/game/client | |
| parent | 0bce750a33576a48b11defb12f73a671c3de5c10 (diff) | |
| download | zcatch-86708818e9012a59cb00f6d836000a5c72850195.tar.gz zcatch-86708818e9012a59cb00f6d836000a5c72850195.zip | |
fixed wrong map download speed when switching to the editor while downloading. Closes #951
Diffstat (limited to 'src/game/client')
| -rw-r--r-- | src/game/client/components/menus.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/game/client/components/menus.cpp b/src/game/client/components/menus.cpp index d27307f4..8d0bdb16 100644 --- a/src/game/client/components/menus.cpp +++ b/src/game/client/components/menus.cpp @@ -1045,7 +1045,7 @@ int CMenus::Render() } // update download speed - float Diff = Client()->MapDownloadAmount()-m_DownloadLastCheckSize; + float Diff = (Client()->MapDownloadAmount()-m_DownloadLastCheckSize)/((int)((Now-m_DownloadLastCheckTime)/time_freq())); float StartDiff = m_DownloadLastCheckSize-0.0f; if(StartDiff+Diff > 0.0f) m_DownloadSpeed = (Diff/(StartDiff+Diff))*(Diff/1.0f) + (StartDiff/(Diff+StartDiff))*m_DownloadSpeed; |