From: Holger Schemel Date: Thu, 30 May 2019 18:38:04 +0000 (+0200) Subject: fixed bug with resetting variable which may already be set X-Git-Tag: 4.1.4.0~31 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=1ca0fee4ac95ccdbcd409ea064c1a2c4de68fc91 fixed bug with resetting variable which may already be set --- 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