projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
63ede61
)
fixed moving tile cursor off the visible playfield area in MM engine
author
Holger Schemel
<info@artsoft.org>
Mon, 3 Apr 2023 09:09:04 +0000
(11:09 +0200)
committer
Holger Schemel
<info@artsoft.org>
Mon, 3 Apr 2023 09:09:04 +0000
(11:09 +0200)
src/events.c
patch
|
blob
|
history
diff --git
a/src/events.c
b/src/events.c
index 2810e84f11643b1cb09a99bde0faf69efb90dafc..e03f58f9b942b80c3c3f204eb7f2c8af9e71d245 100644
(file)
--- a/
src/events.c
+++ b/
src/events.c
@@
-2556,10
+2556,10
@@
static void HandleTileCursor(int dx, int dy, int button)
int new_xpos = tile_cursor.xpos + dx;
int new_ypos = tile_cursor.ypos + dy;
- if (!IN_LEV_FIELD(new_xpos, old_ypos))
+ if (!IN_LEV_FIELD(new_xpos, old_ypos)
|| !IN_SCR_FIELD(new_xpos, old_ypos)
)
new_xpos = old_xpos;
- if (!IN_LEV_FIELD(old_xpos, new_ypos))
+ if (!IN_LEV_FIELD(old_xpos, new_ypos)
|| !IN_SCR_FIELD(old_xpos, new_ypos)
)
new_ypos = old_ypos;
SetTileCursorTargetXY(new_xpos, new_ypos);