Prevent getting locked down with unitialized random seed

This commit is contained in:
Kiloku 2025-02-02 10:46:10 -03:00 committed by Lywx
parent 2d803af01f
commit 62029c436c

View File

@ -19,6 +19,9 @@ void Rand_Init(void) {
}
f32 Rand_ZeroOne(void) {
if (sRandSeed1 == sRandSeed2 == sRandSeed3 == 0){
Rand_Init();
}
sRandSeed1 = (sRandSeed1 * 171) % 30269;
sRandSeed2 = (sRandSeed2 * 172) % 30307;
sRandSeed3 = (sRandSeed3 * 170) % 30323;