From: Holger Schemel Date: Sun, 8 Oct 2023 22:16:53 +0000 (+0200) Subject: fixed bug with global animation at top left playfield corner for one frame X-Git-Tag: 4.3.7.0~6 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=03202ac75897c6b698a7bd97ffa041ca0e94d9b2;p=rocksndiamonds.git fixed bug with global animation at top left playfield corner for one frame --- 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; }