From 31c28bbd0349475079ed2111c32b3cd07400554e Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Fri, 27 Mar 2009 14:26:23 +0100 Subject: 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 --- src/being.h | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'src/being.h') 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 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; -- cgit v1.2.3-70-g09d2