diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-03-27 14:26:23 +0100 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-03-27 14:34:30 +0100 |
commit | 31c28bbd0349475079ed2111c32b3cd07400554e (patch) | |
tree | f3068b3760b1782321143e3a06fe55fca8ae48f1 /src/being.h | |
parent | 057e55c47ef3194ad56a09128eaa959984f2fd4a (diff) | |
download | mana-31c28bbd0349475079ed2111c32b3cd07400554e.tar.gz mana-31c28bbd0349475079ed2111c32b3cd07400554e.tar.bz2 mana-31c28bbd0349475079ed2111c32b3cd07400554e.tar.xz mana-31c28bbd0349475079ed2111c32b3cd07400554e.zip |
Fixed position of dots on minimap
Also made mPx and mPy private and synchronize with mPos on
setPosition(). The side effects of setting destination and clearing the
path have been removed from setPosition(). Only the tmwserv
PlayerHandler seemed to rely on that feature.
Mantis-issue: 672
Diffstat (limited to 'src/being.h')
-rw-r--r-- | src/being.h | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/src/being.h b/src/being.h index 158f2f72..0faf794e 100644 --- a/src/being.h +++ b/src/being.h @@ -387,24 +387,16 @@ class Being : public Sprite virtual void draw(Graphics *graphics, int offsetX, int offsetY) const; /** - * Returns the pixel X coordinate. + * Returns the X coordinate in pixels. */ -#ifdef TMWSERV_SUPPORT - int getPixelX() const { return (int) mPos.x; } -#else int getPixelX() const { return mPx; } -#endif /** - * Returns the pixel Y coordinate. + * Returns the Y coordinate in pixels. * * @see Sprite::getPixelY() */ -#ifdef TMWSERV_SUPPORT - int getPixelY() const { return (int) mPos.y; } -#else int getPixelY() const { return mPy; } -#endif #ifdef EATHENA_SUPPORT /** @@ -421,8 +413,7 @@ class Being : public Sprite #endif /** - * Sets the position of this being. When the being was walking, it also - * clears the destination and the path. + * Sets the position of this being. */ void setPosition(const Vector &pos); @@ -545,7 +536,7 @@ class Being : public Sprite void setPath(const Path &path); /** - * Let the sub-classes react to a replacement + * Let the sub-classes react to a replacement. */ virtual void updateCoords() {} @@ -608,7 +599,6 @@ class Being : public Sprite int mHairStyle; int mHairColor; Gender mGender; - int mPx, mPy; /**< Pixel coordinates */ Uint16 mStunMode; /**< Stun mode; zero if not stunned */ std::set<int> mStatusEffects; /**< set of active status effects */ @@ -640,6 +630,7 @@ class Being : public Sprite Vector mPos; Vector mDest; + int mPx, mPy; /**< Position in pixels */ // Target cursor being used SimpleAnimation* mUsedTargetCursor; |