summaryrefslogtreecommitdiff
path: root/src/localplayer.h
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2012-02-06 22:43:36 +0100
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2012-02-07 00:08:06 +0100
commit957198ff4fcd42431f2c352e21e9cbd3dabaed3a (patch)
tree15f1682012ae57bd4d823bd599f4918db19158e0 /src/localplayer.h
parent762bd357756e35b0a25cc6a66a890dfedb1f6596 (diff)
downloadmana-957198ff4fcd42431f2c352e21e9cbd3dabaed3a.tar.gz
mana-957198ff4fcd42431f2c352e21e9cbd3dabaed3a.tar.bz2
mana-957198ff4fcd42431f2c352e21e9cbd3dabaed3a.tar.xz
mana-957198ff4fcd42431f2c352e21e9cbd3dabaed3a.zip
Hopefully fixed two issues in the go and attack playflow
- Fixed the player attacking when clicking on a monster, and then walking near using the keyboard. - Fixed the walking glitch seen in tile path mode by letting the character reach its nearest tile path node. Reviewed-by: Thorbjørn Lindeijer
Diffstat (limited to 'src/localplayer.h')
-rw-r--r--src/localplayer.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/localplayer.h b/src/localplayer.h
index 64e37fee..0d7b6077 100644
--- a/src/localplayer.h
+++ b/src/localplayer.h
@@ -130,6 +130,8 @@ class LocalPlayer : public Being
virtual void setDestination(int x, int y);
virtual void setDestination(const Vector &dest)
{ setDestination((int)dest.x, (int)dest.y); }
+ virtual void setDestination(const Position &dest)
+ { setDestination(dest.x, dest.y); }
/**
* Sets a new direction to keep walking in, when using the keyboard
@@ -149,6 +151,13 @@ class LocalPlayer : public Being
void setGotoTarget(Being *target);
/**
+ * Cancel a possible target destination in progress,
+ * but not the targeting.
+ */
+ void cancelGoToTarget()
+ { mGoingToTarget = mKeepAttacking = false; }
+
+ /**
* Returns whether the target is in range (in pixels).
*/
bool withinRange(Actor *target, int range) const;