From 70fe541d68f18a22eb3bd134f128c0d56b885701 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sun, 10 Jun 2018 15:26:36 +0200 Subject: [PATCH] fixed ignoring clicks on global animations after executing event actions --- src/anim.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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 -- 2.34.1