Skip to content

Commit

Permalink
Fixed bonus sound with energy full
Browse files Browse the repository at this point in the history
  • Loading branch information
twojstaryzdomu committed May 6, 2023
1 parent baa6a22 commit 6d26678
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions p2/level.c
Original file line number Diff line number Diff line change
Expand Up @@ -2801,12 +2801,12 @@ static void level_update_player_collision() {
g_vars.player_club_type = 3;
level_clear_item(obj);
} else if (num <= 20) {
play_sound(8);
level_clear_item(obj);
++g_vars.bonus_energy_counter;
g_vars.redraw_cache = true;
if (g_vars.bonus_energy_counter >= 6) {
if (g_vars.player_energy != 3) {
play_sound(8);
++g_vars.player_energy;
g_vars.redraw_cache = true;
g_vars.bonus_energy_counter = 0;
Expand Down Expand Up @@ -2884,8 +2884,8 @@ static void level_update_player_collision() {
g_vars.redraw_cache = true;
level_add_object75_score(obj, 228);
} else if (num == 173) {
play_sound(4);
if (g_vars.player_energy < 3) {
play_sound(4);
++g_vars.player_energy;
g_vars.redraw_cache = true;
level_clear_item(obj);
Expand Down

0 comments on commit 6d26678

Please sign in to comment.