Instead of calling rnd(), just select the average between iMaxDist and iMinDist.
This fixes an issue where a Course entry that only specifies a meter range will potentially select different songs for each difficulty.
This commit is contained in:
+2
-4
@@ -638,8 +638,7 @@ bool Course::GetTrailUnsorted( StepsType st, CourseDifficulty cd, Trail &trail )
|
||||
if( iMaxDist == iMinDist )
|
||||
iAdd = iMaxDist;
|
||||
else {
|
||||
std::uniform_int_distribution<> dist( iMinDist, iMaxDist );
|
||||
iAdd = dist( rnd );
|
||||
iAdd = std::floor((iMinDist + iMaxDist) / 2);
|
||||
}
|
||||
iLowMeter += iAdd;
|
||||
iHighMeter += iAdd;
|
||||
@@ -871,8 +870,7 @@ void Course::GetTrailUnsortedEndless( const std::vector<CourseEntry> &entries, T
|
||||
if( iMaxDist == iMinDist )
|
||||
iAdd = iMaxDist;
|
||||
else {
|
||||
std::uniform_int_distribution<> dist( iMinDist, iMaxDist );
|
||||
iAdd = dist( rnd );
|
||||
iAdd = std::floor((iMinDist + iMaxDist) / 2);
|
||||
}
|
||||
iLowMeter += iAdd;
|
||||
iHighMeter += iAdd;
|
||||
|
||||
Reference in New Issue
Block a user