From d13891b93e2ae56a4b2b1486297564224c1f0959 Mon Sep 17 00:00:00 2001 From: colbyhub Date: Tue, 18 Jan 2022 20:22:18 -0800 Subject: [PATCH] Fix stuck particle bug I spent too much time trying to fix this. Fixes: https://todo.sr.ht/~colbyhub/pocket_dust-issues/17 --- src/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index d319d25..12fb6bb 100644 --- a/src/main.c +++ b/src/main.c @@ -494,8 +494,8 @@ void update(void) { static int primary_material_id = 1; static int secondary_material_id = 2; - for (int x = CANVAS_WIDTH - 1; x > 0; x--) { - for (int y = CANVAS_HEIGHT - 1; y > 0; y--) { + for (int x = CANVAS_WIDTH - 1; x >= 0; x--) { + for (int y = CANVAS_HEIGHT - 1; y >= 0; y--) { set_particle_updated(get_particle(x, y), false); } } -- 2.34.2