From: Holger Schemel Date: Wed, 13 Sep 2023 08:51:48 +0000 (+0200) Subject: fixed calculating position of global animations triggered by CE change X-Git-Tag: 4.3.7.0~20 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=971aa79cbc79ec491c79b81a54fed862e04b3f27;p=rocksndiamonds.git fixed calculating position of global animations triggered by CE change --- diff --git a/src/anim.c b/src/anim.c index bd1847a9..9611fa67 100644 --- a/src/anim.c +++ b/src/anim.c @@ -1736,8 +1736,10 @@ static int HandleGlobalAnim_Part(struct GlobalAnimPartControlInfo *part, int fy = getFieldbufferOffsetY_RND(ScreenMovDir, ScreenGfxPos); int sx = FX + SCREENX(part->tile_x) * TILEX_VAR; int sy = FY + SCREENY(part->tile_y) * TILEY_VAR; - int x = sx - fx; - int y = sy - fy; + int cx = SX - REAL_SX; + int cy = SY - REAL_SY; + int x = sx - fx + cx; + int y = sy - fy + cy; part->tile_xoffset += part->step_xoffset; part->tile_yoffset += part->step_yoffset;