Browse Source

game: fix integer division by zero in baseachievement( fixes #87 )

dedicated-build-fix
nillerusr 2 years ago
parent
commit
97e7d4a870
  1. 4
      game/shared/baseachievement.cpp

4
game/shared/baseachievement.cpp

@ -276,7 +276,9 @@ void CBaseAchievement::SetShowOnHUD( bool bShow )
void CBaseAchievement::HandleProgressUpdate() void CBaseAchievement::HandleProgressUpdate()
{ {
// which notification is this // 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 we haven't already shown this progress step, show it
if ( iProgress > m_iProgressShown || m_iCount == 1 ) if ( iProgress > m_iProgressShown || m_iCount == 1 )
{ {

Loading…
Cancel
Save