about summary refs log tree commit diff
path: root/src/game
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2011-06-27 22:35:23 +0200
committeroy <Tom_Adams@web.de>2011-06-27 22:35:23 +0200
commite8938e3d8044d5f4a71c578c69019052f6a07bf1 (patch)
treee6aa9128ee8cc313523f01f3bfc26f4703e30032 /src/game
parentb7ce39be94c3a8d9f8a265afc3053606781f181f (diff)
downloadzcatch-e8938e3d8044d5f4a71c578c69019052f6a07bf1.tar.gz
zcatch-e8938e3d8044d5f4a71c578c69019052f6a07bf1.zip
set the minimum of seconds remaining in map downloading popup to 1
Diffstat (limited to 'src/game')
-rw-r--r--src/game/client/components/menus.cpp2
1 files changed, 1 insertions, 1 deletions
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<int>((Client()->MapDownloadTotalsize()-Client()->MapDownloadAmount())/m_DownloadSpeed) : 1);
 				if(TimeLeft >= 60)
 				{
 					TimeLeft /= 60;