summaryrefslogtreecommitdiff
path: root/src/being.h
diff options
context:
space:
mode:
authorBertram <bertram@cegetel.net>2009-10-15 01:38:18 +0200
committerBertram <bertram@cegetel.net>2009-10-15 01:38:18 +0200
commit2f55dd130c886376a45c9d0054dbd987cc055155 (patch)
treea0a1f25a6310b9e29ab10c442ba10cb2a1a1145e /src/being.h
parentb4befc985875588a4b454b112b8b79a94c26e5e6 (diff)
downloadMana-2f55dd130c886376a45c9d0054dbd987cc055155.tar.gz
Mana-2f55dd130c886376a45c9d0054dbd987cc055155.tar.bz2
Mana-2f55dd130c886376a45c9d0054dbd987cc055155.tar.xz
Mana-2f55dd130c886376a45c9d0054dbd987cc055155.zip
Speed code unification part 3: Made the client handle the speed in tiles per second in TMWserv.
While I was on it, I tweaked the default speed value to its final 6 tiles per second value, which seems to be nice to me. Another notice, the server does already send speed value to the player. The keyboard movement protocol is one step ahead Release Candidate, enjoy ;)
Diffstat (limited to 'src/being.h')
-rw-r--r--src/being.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/being.h b/src/being.h
index 5869b879..c6c49f5e 100644
--- a/src/being.h
+++ b/src/being.h
@@ -259,11 +259,18 @@ class Being : public Sprite, public ConfigListener
virtual Type getType() const { return UNKNOWN; }
/**
- * Sets the walk speed (in pixels per second).
+ * Sets the walk speed.
+ * in pixels per second for eAthena,
+ * in tiles per second for TMWserv.
*/
- void setWalkSpeed(int speed) { mWalkSpeed = speed; }
+ void setWalkSpeed(float speed) { mWalkSpeed = speed; }
- int getWalkSpeed() const { return mWalkSpeed; }
+ /**
+ * Gets the walk speed.
+ * in pixels per second for eAthena,
+ * in tiles per second for TMWserv (0.1 precision).
+ */
+ float getWalkSpeed() const { return mWalkSpeed; }
/**
* Sets the sprite id.
@@ -568,7 +575,12 @@ class Being : public Sprite, public ConfigListener
/** Speech Bubble components */
SpeechBubble *mSpeechBubble;
- int mWalkSpeed; /**< Walking speed (pixels/sec) */
+ /**
+ * Walk speed.
+ * In pixels per second for eAthena,
+ * In tiles per second (0.1 precision) for TMWserv.
+ */
+ float mWalkSpeed;
Vector mPos;
Vector mDest;