diff --git a/mp/src/game/server/vote_controller.cpp b/mp/src/game/server/vote_controller.cpp index b8cc6b053..e34600bdf 100755 --- a/mp/src/game/server/vote_controller.cpp +++ b/mp/src/game/server/vote_controller.cpp @@ -769,7 +769,6 @@ int CVoteController::GetWinningVoteOption( void ) else { // Which option had the most votes? - // driller: Need to handle ties int nHighest = m_nVoteOptionCount[0]; m_nHighestCountIndex = 0; for ( int iIndex = 0; iIndex < m_nVoteOptionCount.Count(); iIndex ++ ) @@ -780,6 +779,11 @@ int CVoteController::GetWinningVoteOption( void ) nHighest = m_nVoteOptionCount[iIndex]; m_nHighestCountIndex = iIndex; } + else if (nHighest == m_nVoteOptionCount[iIndex]) + { + // We have a tie => reset index + m_nHighestCountIndex = -1; + } } return m_nHighestCountIndex;