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).
{
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))
{
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)