1
0
Fork 1
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:
Chris Robinson 2012-03-24 21:05:03 -07:00
parent 2bc81a778b
commit 3e98e28059

View file

@ -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();