1
0
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:
sfan5
2025-03-30 16:42:26 +02:00
parent 785c042f1f
commit 1281173e50
4 changed files with 18 additions and 18 deletions

View File

@@ -20,7 +20,7 @@ u32 myrand()
return g_pcgrand.next();
}
void mysrand(unsigned int seed)
void mysrand(u64 seed)
{
g_pcgrand.seed(seed);
}

View File

@@ -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);