mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-07 17:29:36 +00:00
game: fix integer division by zero in baseachievement( fixes #87 )
This commit is contained in:
@@ -276,7 +276,9 @@ void CBaseAchievement::SetShowOnHUD( bool bShow )
|
||||
void CBaseAchievement::HandleProgressUpdate()
|
||||
{
|
||||
// which notification is this
|
||||
int iProgress = m_iCount / m_iProgressMsgIncrement;
|
||||
int iProgress = -1;
|
||||
if( m_iProgressMsgIncrement > 0 ) iProgress = m_iCount / m_iProgressMsgIncrement;
|
||||
|
||||
// if we haven't already shown this progress step, show it
|
||||
if ( iProgress > m_iProgressShown || m_iCount == 1 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user