summaryrefslogtreecommitdiff
path: root/src/bullets.c
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrik@amftech.nl>2022-12-18 11:24:42 +0100
committerAldrik Ramaekers <aldrik@amftech.nl>2022-12-18 11:24:42 +0100
commit1ac44d4ec6b6b51fefe6ca50ef82d5d2fc1f6dfb (patch)
tree8322478a56450878e2f02a6a794a4a664d86e176 /src/bullets.c
parent89984db7afa433e2842c4ef8c8c265a3e3993636 (diff)
wall items
Diffstat (limited to 'src/bullets.c')
-rw-r--r--src/bullets.c5
1 files changed, 3 insertions, 2 deletions
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;
}
}