Posts: 359
Threads: 63
Joined: Jul 2010
Reputation:
0
Title is my question, I've tested it and I always get the same weather when I start my gamemode, and I know the random switch function is being called. ( codes fine )
Posts: 166
Threads: 0
Joined: Feb 2013
Almost every random function ever is psudo-random. Try this when you start the mode:
pawn Код:
for (new i = 0; j = gettime(); i < j; i += 60) random();
That will call random a huge load of times to discard initial values - essentially seeding the generator (the number of times it is called goes up once a minute). Or use the MerRand plugin if you really need high entropy.
Posts: 359
Threads: 63
Joined: Jul 2010
Reputation:
0
entropy is not required, but at least on windows the function seemed to be working off something dynamic, it seems like linux generates everything as it starts, making it truly pseudo random ( or at least noticable! )
thank you for the seed method, will definitely be using.