mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-25 21:23:42 -04:00
Use a better method to get a more even randomization
This commit is contained in:
parent
2bc81a778b
commit
3e98e28059
@ -350,7 +350,7 @@ namespace MWSound
|
||||
return;
|
||||
}
|
||||
|
||||
int r = rand() % total; //old random code
|
||||
int r = (int)(rand()/((double)RAND_MAX+1) * total);
|
||||
int pos = 0;
|
||||
|
||||
soundIter = regn->soundList.begin();
|
||||
|
Loading…
x
Reference in New Issue
Block a user