Skip to content

Commit

Permalink
fix: you can't shoot while reloading
Browse files Browse the repository at this point in the history
  • Loading branch information
iWas-Coder committed Apr 7, 2024
1 parent 54dca4f commit bfface5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sk_weapon.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void sk_weapon_draw(sk_weapon *w, Camera3D *cam, Vector3 offset, f32 scale) {
}

void sk_weapon_shoot(sk_weapon *w) {
if (!w->ammo.magazine) return;
if (!w->ammo.magazine || IsSoundPlaying(w->sound_reload)) return;
++w->model_anim_frame_count;
UpdateModelAnimation(w->model, w->model_anims[0], w->model_anim_frame_count);
if (w->model_anim_frame_count >= w->model_anims[0].frameCount) w->model_anim_frame_count = 0;
Expand Down

0 comments on commit bfface5

Please sign in to comment.