From aab847999947880ea67b7069e26aa2ad40ab86ae Mon Sep 17 00:00:00 2001 From: arngo <27396817+arngo@users.noreply.github.com> Date: Tue, 30 May 2023 14:16:56 -0400 Subject: only play sounds for player bullets --- src/bullet.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bullet.c b/src/bullet.c index 77acaa7..4da1429 100644 --- a/src/bullet.c +++ b/src/bullet.c @@ -148,10 +148,13 @@ bullet_destroy( cvec_bullet_t_value* bullet ) { + if (bullet->id.world == &player_bullet_collision_world) + { + rodeo_audio_sound_play(pop_sound); + } rodeo_collision_2d_world_item_destroy_by_id(bullet->id); *bullet = *cvec_bullet_t_back(&bullets); cvec_bullet_t_pop(&bullets); - rodeo_audio_sound_play(pop_sound); } void bullet_wall_resolver( -- cgit v1.2.3