v2.5.3: fixed RNG in falling loading affecting levelgen

This commit is contained in:
Evan Debenham
2024-09-24 11:44:34 -04:00
parent 0a74ed12ba
commit 4eccfda92a
2 changed files with 36 additions and 6 deletions
@@ -577,8 +577,11 @@ public class InterlevelScene extends PixelScene {
if (mode == Mode.FALL) {
loadingText.setPos(
(Camera.main.width - loadingText.width() - 4) + Random.NormalFloat(-2, 2),
(Camera.main.height - loadingText.height() - 6) + Random.NormalFloat(-2, 2)
//the randomization is effectively -2 to +2
// we don't use the generator stack as levelgen may be occurring
// and we don't want to accidentally use a seeded generator
(Camera.main.width - loadingText.width() - 4) + 4*(Random.Float(false)-0.5f),
(Camera.main.height - loadingText.height() - 6) + 4*(Random.Float(false)-0.5f)
);
align(loadingText);
}