Random() is pseudo on unix?
#1

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 )
Reply
#2

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.
Reply
#3

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.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)