From 00d44c63bc21c93272ad27374d9fcd089d999105 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Sat, 7 Apr 2007 10:04:08 +0000 Subject: [PATCH] GetRandomSong() was returning songs in the same order every time using the internal RNG. Use g_RandomNumberGenerator instead. --- stepmania/src/SongManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stepmania/src/SongManager.cpp b/stepmania/src/SongManager.cpp index 30326b8c72..7fc95cd03a 100644 --- a/stepmania/src/SongManager.cpp +++ b/stepmania/src/SongManager.cpp @@ -1336,10 +1336,10 @@ void SongManager::UpdateShuffled() { // update shuffled m_pShuffledSongs = m_pSongs; - random_shuffle( m_pShuffledSongs.begin(), m_pShuffledSongs.end() ); + random_shuffle( m_pShuffledSongs.begin(), m_pShuffledSongs.end(), g_RandomNumberGenerator ); m_pShuffledCourses = m_pCourses; - random_shuffle( m_pShuffledCourses.begin(), m_pShuffledCourses.end() ); + random_shuffle( m_pShuffledCourses.begin(), m_pShuffledCourses.end(), g_RandomNumberGenerator ); } void SongManager::UpdatePreferredSort()