From 59dfcb6483fe02ca325b7008924c188a54f5dede Mon Sep 17 00:00:00 2001 From: Isaac0-dev <62234577+Isaac0-dev@users.noreply.github.com> Date: Thu, 9 May 2024 23:24:03 +1000 Subject: [PATCH] made rng positions more random (#33) coins will still consistently spawn in the same formation --- src/game/rng_position.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/rng_position.c b/src/game/rng_position.c index 64d2ec038..5cf8978a0 100644 --- a/src/game/rng_position.c +++ b/src/game/rng_position.c @@ -26,7 +26,7 @@ void rng_position_init(f32 x, f32 y, f32 z) { for (u8 i = 0; i < RNG_POSITION_MAX; i++) { if (sRngPosition[i].life != 0) { continue; } sRngPosition[i].life = RNG_POSITION_LIFE; - sRngPosition[i].seed = (u16)((position[0] / (3 * RNG_POSITION_MATCH_DIST)) + (position[1] / (3 * RNG_POSITION_MATCH_DIST))); + sRngPosition[i].seed = (u16)((position[0] / 3) + (position[1] / 3)); vec3f_copy(sRngPosition[i].position, position); gOverrideRngPosition = &sRngPosition[i]; return;