summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/being.cpp3
-rw-r--r--src/engine.cpp6
-rw-r--r--src/game.cpp5
3 files changed, 8 insertions, 6 deletions
diff --git a/src/being.cpp b/src/being.cpp
index c3add140..f49e7145 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -211,6 +211,9 @@ void Being::nextStep()
y = path->y;
} else {
action = STAND;
+ if (this == player_node) {
+ walk_status = 0;
+ }
}
frame = 0;
walk_time = tick_time;
diff --git a/src/engine.cpp b/src/engine.cpp
index ecf75750..8ba4e7ea 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -379,11 +379,7 @@ void Engine::draw()
(get_elapsed_time(being->walk_time) * 4) / (being->speed);
if (being->frame >= 4) {
- being->frame = 0;
- being->action = STAND;
- if (being->id == player_node->id) {
- walk_status = 0;
- }
+ being->nextStep();
}
}
}
diff --git a/src/game.cpp b/src/game.cpp
index cb6d3615..81c07375 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -353,8 +353,11 @@ void do_input()
}
else if (event.button.button == 1)
{
- // Experimental mouse walk command
+ // Experimental mouse walk support
walk(mx, my, 0);
+ player_node->setPath(tiledMap->findPath(
+ player_node->x, player_node->y,
+ mx, my));
}
}