summaryrefslogtreecommitdiff
path: root/src/gui/gui.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-04-30 13:29:45 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-04-30 13:29:45 +0000
commitad3623ced5020c9c886cb85100ae05efa460f84a (patch)
tree2f01f33e4bf0f5e20f81a7d3f64cd6466381df95 /src/gui/gui.cpp
parent22799314e68a0535f65cc7aa56c490cdde7ca544 (diff)
downloadmana-client-ad3623ced5020c9c886cb85100ae05efa460f84a.tar.gz
mana-client-ad3623ced5020c9c886cb85100ae05efa460f84a.tar.bz2
mana-client-ad3623ced5020c9c886cb85100ae05efa460f84a.tar.xz
mana-client-ad3623ced5020c9c886cb85100ae05efa460f84a.zip
Some fixes to player control, also attempting to solve long walk path problem.
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r--src/gui/gui.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index d9ab90bd..5ef31a78 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -101,9 +101,11 @@ void Gui::draw()
void Gui::mousePress(int mx, int my, int button)
{
// Mouse pressed on window container (basically, the map)
- // Experimental mouse walk support
- if (button == gcn::MouseInput::LEFT) {
+ // When conditions for walking are met, set new player destination
+ if (player_node->action != DEAD && current_npc == 0 &&
+ button == gcn::MouseInput::LEFT)
+ {
int tilex = mx / 32 + camera_x;
int tiley = my / 32 + camera_y;