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/monster.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/monster.cpp') diff --git a/src/monster.cpp b/src/monster.cpp index eaea6225..f786471d 100644 --- a/src/monster.cpp +++ b/src/monster.cpp @@ -217,8 +217,9 @@ void Monster::setShowName(bool show) if (show) { - mText = new Text(getInfo().getName(), mPx + NAME_X_OFFSET, - mPy + NAME_Y_OFFSET - getHeight(), + mText = new Text(getInfo().getName(), + getPixelX() + NAME_X_OFFSET, + getPixelY() + NAME_Y_OFFSET - getHeight(), gcn::Graphics::CENTER, &guiPalette->getColor(Palette::MONSTER)); } @@ -232,7 +233,7 @@ void Monster::updateCoords() { if (mText) { - mText->adviseXY(mPx + NAME_X_OFFSET, - mPy + NAME_Y_OFFSET - getHeight()); + mText->adviseXY(getPixelX() + NAME_X_OFFSET, + getPixelY() + NAME_Y_OFFSET - getHeight()); } } -- cgit v1.2.3-60-g2f50