mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-19 15:39:42 +00:00
Use a better method to get a more even randomization
This commit is contained in:
parent
2bc81a778b
commit
3e98e28059
1 changed files with 1 additions and 1 deletions
|
@ -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…
Reference in a new issue