Jump to content

urand doesn't change


Recommended Posts

Posted

Could you confirm that urand(0, 1) always give the same result while mangos is alive?

/* Return a random number in the range min..max (inclusive). For reliable results, the difference * between max and min should be less than RAND32_MAX. */
MANGOS_DLL_SPEC uint32 urand(uint32 min, uint32 max);

I have tested this with scriptdev2, where urand is called always give the same answer in the same mangos life

Maybe a seed is needed?

Thank you

Posted

MANGOS_DLL_SPEC uint32 urand(uint32 min, uint32 max); ???

i think the urand(...) funcion should use direct in sd2

like this one

m_uiEyebeam_Timer = 10000 + urand(1000, 5000);

This works realy good, you doesn't need MANGOS_DLL_SPEC

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use