From: Holger Schemel Date: Sun, 10 Jun 2018 13:26:36 +0000 (+0200) Subject: fixed ignoring clicks on global animations after executing event actions X-Git-Tag: 4.1.1.0~138 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=70fe541d68f18a22eb3bd134f128c0d56b885701;p=rocksndiamonds.git fixed ignoring clicks on global animations after executing event actions --- diff --git a/src/anim.c b/src/anim.c index 0a4946a2..de1c40bf 100644 --- a/src/anim.c +++ b/src/anim.c @@ -1483,6 +1483,7 @@ static boolean InitGlobalAnim_Clicked(int mx, int my, boolean clicked) { boolean anything_clicked = FALSE; boolean any_part_clicked = FALSE; + boolean any_event_action = FALSE; int mode_nr; // check game modes in reverse draw order (to stop when clicked) @@ -1530,9 +1531,9 @@ static boolean InitGlobalAnim_Clicked(int mx, int my, boolean clicked) part->control_info.anim_event_action); #endif - // after executing event action, force click to be ignored - if (DoGlobalAnim_EventAction(part)) - return TRUE; + // after executing event action, ignore any further actions + if (!any_event_action && DoGlobalAnim_EventAction(part)) + any_event_action = TRUE; any_part_clicked = TRUE; @@ -1570,9 +1571,9 @@ static boolean InitGlobalAnim_Clicked(int mx, int my, boolean clicked) part2->control_info.anim_event_action); #endif - // after executing event action, force click to be ignored - if (DoGlobalAnim_EventAction(part2)) - return TRUE; + // after executing event action, ignore any further actions + if (!any_event_action && DoGlobalAnim_EventAction(part2)) + any_event_action = TRUE; } #if 0