From: Holger Schemel Date: Tue, 14 Nov 2023 22:51:53 +0000 (+0100) Subject: fixed bug with triggering global animations in certain cases X-Git-Tag: 4.3.8.0~41 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=b4daa7d0a171abb2a25609e89c323863e6246b0b fixed bug with triggering global animations in certain cases This fixes a bug that prevents global animations (that have defined an initial (start) event using ".init_event") from being triggered by other animation states or by custom element changes if they have either no parts defined (like "global.anim_1"), or if they have parts defined (like "global.anim_1.part_1"), but have the "main" animation defined to play all parts at the same time (which means that there is a definition "global.anim_1.anim_mode: all"). This bug was caused by the fact that animations waiting for an initial event should be in state "waiting", which was not checked in case of an event (as parts defined for global animations that are not defined to be played all at the same time are in state "running" even if they are waiting for an initial event, which should also be fixed). --- diff --git a/src/anim.c b/src/anim.c index 4f1034eb..7ecdf8fd 100644 --- a/src/anim.c +++ b/src/anim.c @@ -1394,7 +1394,7 @@ static void InitGlobalAnim_Triggered(struct GlobalAnimPartControlInfo *part, { struct GlobalAnimPartControlInfo *part2 = &anim2->part[part2_nr]; - if (!(part2->state & ANIM_STATE_RUNNING)) + if (!(part2->state & (ANIM_STATE_RUNNING | ANIM_STATE_WAITING))) continue; if (isClickablePart(part2, mask)) @@ -1457,7 +1457,7 @@ static void InitGlobalAnim_Triggered_ByCustomElement(int nr, int page, { struct GlobalAnimPartControlInfo *part2 = &anim2->part[part2_nr]; - if (!(part2->state & ANIM_STATE_RUNNING)) + if (!(part2->state & (ANIM_STATE_RUNNING | ANIM_STATE_WAITING))) continue; if (isClickablePart(part2, mask) && !part2->triggered)