mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-28 15:41:13 -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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int r = rand() % total; //old random code
|
int r = (int)(rand()/((double)RAND_MAX+1) * total);
|
||||||
int pos = 0;
|
int pos = 0;
|
||||||
|
|
||||||
soundIter = regn->soundList.begin();
|
soundIter = regn->soundList.begin();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user