X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fanim.c;h=c457936bcd7582b48c65f3c0c2143ea7753e993b;hb=03202ac7;hp=3dd9a14394766938b2c762d0303e824c03eb53dc;hpb=d3bcf9a438f1d60468d934026eb66b2215628e63;p=rocksndiamonds.git diff --git a/src/anim.c b/src/anim.c index 3dd9a143..c457936b 100644 --- a/src/anim.c +++ b/src/anim.c @@ -1461,16 +1461,15 @@ static void InitGlobalAnim_Triggered_ByCustomElement(int nr, int page, if (c->position == POS_CE) { - // may contain negative tile offset that is treated as "off-screen" - part2->x = 0; - part2->y = 0; - // store CE tile and offset position to handle scrolling part2->tile_x = x; part2->tile_y = y; part2->tile_xoffset = c->x; part2->tile_yoffset = c->y; + // set resulting animation position relative to CE tile position + SetGlobalAnimPartTileXY(part2); + // restart animation (by using current sync frame) part2->initial_anim_sync_frame = anim_sync_frame; }