summaryrefslogtreecommitdiffhomepage
path: root/src/bullet.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bullet.c')
-rw-r--r--src/bullet.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bullet.c b/src/bullet.c
index 5bdd8f2..52f3778 100644
--- a/src/bullet.c
+++ b/src/bullet.c
@@ -160,7 +160,10 @@ bullet_destroy(
cvec_bullet_t_value* bullet
)
{
- if (bullet->id.world == &player_bullet_collision_world)
+ bool player_is_moving =
+ (*(float*)units_move_right_input(NULL, NULL) + *(float*)units_move_left_input(NULL, NULL)) != 0 ||
+ (*(float*)units_move_down_input(NULL, NULL) + *(float*)units_move_up_input(NULL, NULL)) != 0;
+ if (bullet->id.world == &player_bullet_collision_world || !player_is_moving || get_player_hp() <= 0)
{
rodeo_audio_sound_play(pop_sound);
}