From ebc1db2172d3dc1e954647fc21e80f074e6cda4b Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Fri, 1 Jul 2011 22:57:29 +0200 Subject: 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. --- src/localplayer.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/localplayer.h') 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 MessagePair; /** Queued messages*/ std::list mMessages; -- cgit v1.2.3-70-g09d2