From e8938e3d8044d5f4a71c578c69019052f6a07bf1 Mon Sep 17 00:00:00 2001 From: oy Date: Mon, 27 Jun 2011 22:35:23 +0200 Subject: set the minimum of seconds remaining in map downloading popup to 1 --- src/game/client/components/menus.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/game/client') diff --git a/src/game/client/components/menus.cpp b/src/game/client/components/menus.cpp index 454ef7d5..8e41e81e 100644 --- a/src/game/client/components/menus.cpp +++ b/src/game/client/components/menus.cpp @@ -1058,7 +1058,7 @@ int CMenus::Render() // time left const char *pTimeLeftString; - int TimeLeft = m_DownloadSpeed > 0.0f ? (Client()->MapDownloadTotalsize()-Client()->MapDownloadAmount())/m_DownloadSpeed : 0.0f; + int TimeLeft = max(1, m_DownloadSpeed > 0.0f ? static_cast((Client()->MapDownloadTotalsize()-Client()->MapDownloadAmount())/m_DownloadSpeed) : 1); if(TimeLeft >= 60) { TimeLeft /= 60; -- cgit 1.4.1