summaryrefslogtreecommitdiff
path: root/src/localplayer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-02-02 23:22:29 +0200
committerAndrei Karas <akaras@inbox.ru>2011-02-02 23:22:29 +0200
commit325ddf31483ced5444aa7bde38cc41ac8d3f04c2 (patch)
tree87c4a3ecd753ec77fdb464b448ec7d75e0f82541 /src/localplayer.cpp
parent4ead5c9f65ffbf1de9b0cb60cae06b116badbced (diff)
downloadManaVerse-325ddf31483ced5444aa7bde38cc41ac8d3f04c2.tar.gz
ManaVerse-325ddf31483ced5444aa7bde38cc41ac8d3f04c2.tar.bz2
ManaVerse-325ddf31483ced5444aa7bde38cc41ac8d3f04c2.tar.xz
ManaVerse-325ddf31483ced5444aa7bde38cc41ac8d3f04c2.zip
Fix error where automatically navigation bar can show portal with coord 0,0.
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r--src/localplayer.cpp18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index 29507c685..df4cad26f 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -2810,21 +2810,6 @@ void LocalPlayer::setMap(Map *map)
{
if (map)
{
- std::map<std::string, Vector>::iterator iter =
- mHomes.find(map->getProperty("_filename"));
-
- if (iter != mHomes.end())
- {
- Vector pos = mHomes[(*iter).first];
- SpecialLayer *specialLayer = map->getSpecialLayer();
- if (specialLayer)
- {
-// specialLayer->clean();
- specialLayer->setTile(static_cast<int>(pos.x),
- static_cast<int>(pos.y),
- MapItem::HOME);
- }
- }
if (socialWindow)
socialWindow->updateActiveList();
}
@@ -3621,7 +3606,8 @@ void LocalPlayer::updateNavigateList()
if (iter != mHomes.end())
{
Vector pos = mHomes[(*iter).first];
- mMap->addPortalTile("home", MapItem::HOME, pos.x, pos.y);
+ if (pos.x && pos.y)
+ mMap->addPortalTile("home", MapItem::HOME, pos.x, pos.y);
}
}
}