From bca34a000fa9da59f4fed2885ce81da10527e757 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sun, 20 Aug 2023 15:21:06 +0200 Subject: [PATCH] changed global animations to handle only one CE change event per frame Before, several (same) CEs could change within the same game frame, triggering the same global animation several times (each time with the new/next CE, with different CE position for each change. for example). This bugfix results in each global animation being triggered exactly one time for each change of the same CE in the same frame (which is especially important if there are several global animations being triggered by the change of the same CE, to display several animations for several same CEs changing in the same game frame). --- src/anim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/anim.c b/src/anim.c index 68147f0b..c1fb1ee6 100644 --- a/src/anim.c +++ b/src/anim.c @@ -1393,7 +1393,7 @@ static void InitGlobalAnim_Triggered_ByCustomElement(int nr, int page, if (!(part2->state & ANIM_STATE_RUNNING)) continue; - if (isClickablePart(part2, mask)) + if (isClickablePart(part2, mask) && !part2->triggered) { struct GraphicInfo *c = &part2->control_info; -- 2.34.1