+ for (part2_nr = 0; part2_nr < anim2->num_parts_all; part2_nr++)
+ {
+ struct GlobalAnimPartControlInfo *part2 = &anim2->part[part2_nr];
+
+ if (!(part2->state & ANIM_STATE_RUNNING))
+ continue;
+
+ if (isClickablePart(part2, mask) && !part2->triggered)
+ {
+ struct GraphicInfo *c = &part2->control_info;
+
+ if (c->position == POS_CE ||
+ c->position == POS_CE_TRIGGER)
+ {
+ // store CE tile and offset position to handle scrolling
+ part2->tile_x = (c->position == POS_CE_TRIGGER ? trigger_x : x);
+ part2->tile_y = (c->position == POS_CE_TRIGGER ? trigger_y : y);
+ part2->tile_xoffset = c->x;
+ part2->tile_yoffset = c->y;
+
+ // set resulting animation position relative to CE tile position
+ // (but only for ".init_event", not ".anim_event" type events)
+ if (part2->init_event_state)
+ SetGlobalAnimPartTileXY(part2);
+
+ // restart animation (by using current sync frame)
+ part2->initial_anim_sync_frame = anim_sync_frame;
+ }
+
+ part2->triggered = TRUE;
+
+ // do not trigger any other animation if CE change event was consumed
+ if (c->style == STYLE_CONSUME_CE_EVENT)
+ return;
+
+#if 0
+ Debug("anim:InitGlobalAnim_Triggered_ByCustomElement",
+ "%d.%d TRIGGERED BY CE %d", anim2_nr, part2_nr, nr + 1);