From 86708818e9012a59cb00f6d836000a5c72850195 Mon Sep 17 00:00:00 2001 From: oy Date: Fri, 20 Apr 2012 22:11:41 +0200 Subject: fixed wrong map download speed when switching to the editor while downloading. Closes #951 --- src/game/client/components/menus.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/game') 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; -- cgit 1.4.1