From 1ca0fee4ac95ccdbcd409ea064c1a2c4de68fc91 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Thu, 30 May 2019 20:38:04 +0200 Subject: [PATCH] fixed bug with resetting variable which may already be set --- src/anim.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/anim.c b/src/anim.c index 9ab9f6dc..0aa1c0f4 100644 --- a/src/anim.c +++ b/src/anim.c @@ -1164,7 +1164,7 @@ static void InitGlobalAnim_Triggered(struct GlobalAnimPartControlInfo *part, if (isClickablePart(part2, mask)) { part2->triggered = TRUE; - *click_consumed = clickConsumed(part); // click was on "part"! + *click_consumed |= clickConsumed(part); // click was on "part"! #if DEBUG_ANIM_EVENTS printf("::: => %d.%d TRIGGERED BY %s OF %d.%d\n", @@ -1804,7 +1804,7 @@ static boolean InitGlobalAnim_Clicked(int mx, int my, int clicked_event) #endif part->clicked = TRUE; - click_consumed = clickConsumed(part); + click_consumed |= clickConsumed(part); } // always handle "unclick:any" events (releasing anywhere on screen) ... @@ -1817,7 +1817,7 @@ static boolean InitGlobalAnim_Clicked(int mx, int my, int clicked_event) #endif part->clicked = TRUE; - click_consumed = clickConsumed(part); + click_consumed |= clickConsumed(part); } // ... but only handle the first (topmost) clickable animation @@ -1837,7 +1837,7 @@ static boolean InitGlobalAnim_Clicked(int mx, int my, int clicked_event) any_event_action = TRUE; // determine if mouse clicks should be blocked from other animations - any_part_clicked = clickConsumed(part); + any_part_clicked |= clickConsumed(part); if (isClickablePart(part, ANIM_EVENT_SELF)) { @@ -1847,7 +1847,7 @@ static boolean InitGlobalAnim_Clicked(int mx, int my, int clicked_event) #endif part->clicked = TRUE; - click_consumed = clickConsumed(part); + click_consumed |= clickConsumed(part); } // check if this click is defined to trigger other animations -- 2.34.1