summaryrefslogtreecommitdiff
path: root/src/gui/gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r--src/gui/gui.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index cf98dde9..c93061a2 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -235,7 +235,9 @@ void Gui::mousePress(int mx, int my, int button)
if (state == GAME && tiledMap->getWalk(tilex, tiley)) {
walk(tilex, tiley, 0);
- player_node->setDestination(tilex, tiley);
+ player_node->setPath(tiledMap->findPath(
+ player_node->x, player_node->y,
+ tilex, tiley));
autoTarget = NULL;
}