diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game.cpp | 3 | ||||
-rw-r--r-- | src/localplayer.cpp | 18 |
2 files changed, 5 insertions, 16 deletions
diff --git a/src/game.cpp b/src/game.cpp index efa5085f5..5984c35c7 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -1392,6 +1392,9 @@ void Game::changeMap(const std::string &mapPath) strprintf(_("Error while loading %s"), fullMap.c_str())); } + if (mCurrentMap) + mCurrentMap->saveExtraLayer(); + if (newMap) newMap->addExtraLayer(); 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); } } } |