projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d72ae21
)
fixed activating robot wheel at wrap-around position for EM engine
author
Holger Schemel
<info@artsoft.org>
Tue, 1 Dec 2020 20:22:41 +0000
(21:22 +0100)
committer
Holger Schemel
<info@artsoft.org>
Tue, 1 Dec 2020 20:22:41 +0000
(21:22 +0100)
src/game_em/logic.c
patch
|
blob
|
history
diff --git
a/src/game_em/logic.c
b/src/game_em/logic.c
index a56547b14a462365e830a8cdfbdb59ac0adead0b..1eaefcfc93421c0303f66dd66f7792a73c202206 100644
(file)
--- a/
src/game_em/logic.c
+++ b/
src/game_em/logic.c
@@
-7768,6
+7768,18
@@
static void logic_players(void)
next[ply[i].x][ply[i].y] = add_player[element];
}
}
+
+ /* check for wheel at wrap-around position */
+ if (lev.wheel_x < lev.left ||
+ lev.wheel_x > lev.right - 1)
+ {
+ int direction = (lev.wheel_x < lev.left ? -1 : 1);
+
+ lev.wheel_x += -direction * lev.width;
+
+ if (!lev.infinite_true)
+ lev.wheel_y += direction;
+ }
}
static void logic_objects(void)