mirror of
https://github.com/luanti-org/luanti.git
synced 2025-11-02 08:15:28 +01:00
Use secure randomness to seed internal RNG
This commit is contained in:
@@ -20,7 +20,7 @@ u32 myrand()
|
||||
return g_pcgrand.next();
|
||||
}
|
||||
|
||||
void mysrand(unsigned int seed)
|
||||
void mysrand(u64 seed)
|
||||
{
|
||||
g_pcgrand.seed(seed);
|
||||
}
|
||||
|
||||
@@ -244,7 +244,7 @@ inline float wrapDegrees_180(float f)
|
||||
*/
|
||||
#define MYRAND_RANGE 0xffffffff
|
||||
u32 myrand();
|
||||
void mysrand(unsigned int seed);
|
||||
void mysrand(u64 seed);
|
||||
void myrand_bytes(void *out, size_t len);
|
||||
int myrand_range(int min, int max);
|
||||
float myrand_range(float min, float max);
|
||||
|
||||
Reference in New Issue
Block a user