From 1ac44d4ec6b6b51fefe6ca50ef82d5d2fc1f6dfb Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Sun, 18 Dec 2022 11:24:42 +0100 Subject: wall items --- src/bullets.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/bullets.c') diff --git a/src/bullets.c b/src/bullets.c index 7397e9f..8012c83 100644 --- a/src/bullets.c +++ b/src/bullets.c @@ -182,7 +182,9 @@ static bool check_if_bullet_collided_with_ground(bullet *b, platform_window* win void clear_bullets() { for (int i = 0; i < max_bullets; i++) { - bullets[i].active = false; + if (bullets[i].alive_time >= 0.05f) { + bullets[i].active = false; + } } } @@ -213,7 +215,6 @@ void update_bullets(platform_window* window) { } bullets[i].alive_time += update_delta; - //bullets[i].active = false; } } -- cgit v1.2.3-70-g09d2