X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame.c;h=8cabb12de8c3ec028aaf681cc3196b4b00142225;hb=dbba72fb511aee11057e6db5d0e9a4d53c9a0ddc;hp=0d1830340a376487b5c2b7d6cd972b537a7060d7;hpb=064d7909aadd84f633fefcccee3c6f6eb44d47ff;p=rocksndiamonds.git diff --git a/src/game.c b/src/game.c index 0d183034..8cabb12d 100644 --- a/src/game.c +++ b/src/game.c @@ -10716,7 +10716,14 @@ static boolean ChangeElement(int x, int y, int element, int page) ChangeCount[x][y]++; // count number of changes in the same frame if (ei->has_anim_event) - HandleGlobalAnimEventByElementChange(element); + { + int fx = getFieldbufferOffsetX_RND(ScreenMovDir, ScreenGfxPos); + int fy = getFieldbufferOffsetY_RND(ScreenMovDir, ScreenGfxPos); + int sx = FX + SCREENX(x) * TILEX_VAR; + int sy = FY + SCREENY(y) * TILEY_VAR; + + HandleGlobalAnimEventByElementChange(element, page, sx - fx, sy - fy); + } if (change->explode) {