diff options
Diffstat (limited to 'src/bullets.c')
| -rw-r--r-- | src/bullets.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bullets.c b/src/bullets.c index d1c8d97..f5d5198 100644 --- a/src/bullets.c +++ b/src/bullets.c @@ -21,14 +21,14 @@ void shoot(platform_window* window, u32 id, float dirx, float diry) { if (bullets_to_shoot > p->ammo_in_mag) bullets_to_shoot = p->ammo_in_mag; p->ammo_in_mag -= bullets_to_shoot; if (p->ammo_in_mag == 0) { - play_positioned_sound(CHANNEL_SHOOTING, wav_reload_mp5, (vec3f){.x = p->playerx, .y = p->playery, .z = p->height}, 10); + add_audio_event_to_queue(EVENT_RELOAD, p->id, (vec3f){.x = p->playerx, .y = p->playery, .z = p->height}); p->interact_state = INTERACT_RELOADING; p->sec_since_interact_state_change = 0; return; } - play_positioned_sound(CHANNEL_SHOOTING, wav_shoot_mp5, (vec3f){.x = p->playerx, .y = p->playery, .z = p->height}, 20); - + add_audio_event_to_queue(EVENT_SHOOT, p->id, (vec3f){.x = p->playerx, .y = p->playery, .z = p->height}); + for (int i = 0; i < bullets_to_shoot; i++) { map_info info = get_map_info(window); |
