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/gui | |
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/gui')
-rw-r--r-- | src/gui/minimap.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/gui/minimap.cpp b/src/gui/minimap.cpp index 93a55688..6bca796d 100644 --- a/src/gui/minimap.cpp +++ b/src/gui/minimap.cpp @@ -119,14 +119,9 @@ void Minimap::draw(gcn::Graphics *graphics) if (mMapImage->getWidth() > a.width || mMapImage->getHeight() > a.height) { -#ifdef TMWSERV_SUPPORT const Vector &p = player_node->getPosition(); mapOriginX = (int) (((a.width) / 2) - (int) (p.x * mProportion) / 32); mapOriginY = (int) (((a.height) / 2) - (int) (p.y * mProportion) / 32); -#else - mapOriginX = (int) (((a.width) / 2) - (player_node->mX * mProportion)); - mapOriginY = (int) (((a.height) / 2) - (player_node->mY * mProportion)); -#endif const int minOriginX = a.width - mMapImage->getWidth(); const int minOriginY = a.height - mMapImage->getHeight(); @@ -181,7 +176,7 @@ void Minimap::draw(gcn::Graphics *graphics) graphics->fillRectangle(gcn::Rectangle( (int) (pos.x * mProportion) / 32 + mapOriginX - offset, - (int) (pos.x * mProportion) / 32 + mapOriginY - offset, + (int) (pos.y * mProportion) / 32 + mapOriginY - offset, dotSize, dotSize)); } |