summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/gui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 943584ce..c79d0833 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -103,7 +103,7 @@ void Gui::mousePress(int mx, int my, int button)
int tiley = my / 32 + camera_y;
// Experimental mouse walk support
- if (state == GAME) {
+ if (state == GAME && tiledMap->getWalk(tilex, tiley)) {
walk(tilex, tiley, 0);
player_node->setPath(tiledMap->findPath(
player_node->x, player_node->y,