mirror of
https://github.com/glest/glest-source.git
synced 2025-08-16 13:23:59 +02:00
- updated random seed generation to be more random
This commit is contained in:
@@ -425,6 +425,10 @@ const string Properties::getRandomKey(const bool realrandom) const{
|
||||
int max=getPropertyCount();
|
||||
int randomIndex=-1;
|
||||
if(realrandom == true){
|
||||
//srand((unsigned int)time(NULL));
|
||||
Chrono seed(true);
|
||||
srand(seed.getCurTicks());
|
||||
|
||||
randomIndex=rand()%max;
|
||||
}
|
||||
else{
|
||||
|
Reference in New Issue
Block a user