summaryrefslogtreecommitdiff
path: root/src/localplayer.h
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-07-01 22:57:29 +0200
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-08-11 02:34:03 +0200
commitebc1db2172d3dc1e954647fc21e80f074e6cda4b (patch)
tree4aa020517c83eb1e625b289cb20135d890f5af6e /src/localplayer.h
parent5c5e17c0b200004c6d18a51e2c02fd21d710f04f (diff)
downloadmana-ebc1db2172d3dc1e954647fc21e80f074e6cda4b.tar.gz
mana-ebc1db2172d3dc1e954647fc21e80f074e6cda4b.tar.bz2
mana-ebc1db2172d3dc1e954647fc21e80f074e6cda4b.tar.xz
mana-ebc1db2172d3dc1e954647fc21e80f074e6cda4b.zip
Made the delay between to keyboard move calls functional.
It has been fixed and be made adapted to the being movement speed. Now, for instance, the client sends 3x times less move calls to the tA server, and roughly 20x times for the Manaserv's one. Resolves: Mana-Mantis #346.
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 ab309d8f..ae27e51e 100644
--- a/src/localplayer.h
+++ b/src/localplayer.h
@@ -147,6 +147,8 @@ class LocalPlayer : public Being
*/
void setTarget(Being *target);
+ void setMoveSpeed(const Vector &speed);
+
/**
* Sets a new destination for this being to walk to.
*/
@@ -253,6 +255,13 @@ class LocalPlayer : public Being
int mLocalWalkTime; /**< Timestamp used to control keyboard walk
messages flooding */
+ /**
+ * The delay between two permitted setDestination() call using
+ * the keyboard.
+ * It's set in milliseconds per tile.
+ */
+ int mKeyboardMoveDelay;
+
typedef std::pair<std::string, int> MessagePair;
/** Queued messages*/
std::list<MessagePair> mMessages;