summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorarngo <[email protected]>2023-05-30 14:16:56 -0400
committerarngo <[email protected]>2023-05-30 14:16:56 -0400
commitaab847999947880ea67b7069e26aa2ad40ab86ae (patch)
tree46e048d2bb56e98481c5947af78d296b66026c37
parentc43ac3e4ce4375b6fa1fa9927e20ff4f88504429 (diff)
downloadTOJam2023-aab847999947880ea67b7069e26aa2ad40ab86ae.tar.gz
TOJam2023-aab847999947880ea67b7069e26aa2ad40ab86ae.zip
only play sounds for player bullets
-rw-r--r--src/bullet.c5
1 files changed, 4 insertions, 1 deletions
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(