From: Holger Schemel Date: Fri, 31 May 2019 14:10:24 +0000 (+0200) Subject: fixed handling global animation click events (again) X-Git-Tag: 4.1.4.0~28 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=8b77194545721f4b8e3f80b59da8423ab2d90dae fixed handling global animation click events (again) Before, only global animations exactly defined for the current game mode were correctly handled. (Example: ".MAIN") Now, also global animations defined for several game modes are correctly handled. (Example: ".MENU") --- diff --git a/src/anim.c b/src/anim.c index 1e155f9e..14dccc69 100644 --- a/src/anim.c +++ b/src/anim.c @@ -1764,6 +1764,7 @@ static boolean InitGlobalAnim_Clicked(int mx, int my, int clicked_event) boolean any_part_clicked = FALSE; boolean any_event_action = FALSE; int mode_nr; + int i; // check game modes in reverse draw order (to stop when clicked) for (mode_nr = NUM_GAME_MODES - 1; mode_nr >= 0; mode_nr--) @@ -1863,7 +1864,8 @@ static boolean InitGlobalAnim_Clicked(int mx, int my, int clicked_event) { handle_click = TRUE; - HandleGlobalAnim(ANIM_CONTINUE, game_status); + for (i = 0; i < NUM_GAME_MODES; i++) + HandleGlobalAnim(ANIM_CONTINUE, i); handle_click = FALSE;