GetRandomSong() was returning songs in the same order every time using the internal RNG. Use g_RandomNumberGenerator instead.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user