projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0771dc2
)
fixed calculating position of global animations triggered by CE change
author
Holger Schemel
<info@artsoft.org>
Wed, 13 Sep 2023 08:51:48 +0000
(10:51 +0200)
committer
Holger Schemel
<info@artsoft.org>
Wed, 13 Sep 2023 08:51:48 +0000
(10:51 +0200)
src/anim.c
patch
|
blob
|
history
diff --git
a/src/anim.c
b/src/anim.c
index bd1847a9a72cb3cef58bb53bba49d8ba44129004..9611fa67d2cbd4139aaba70cd6ebf0d8c8d4c4fd 100644
(file)
--- 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;