diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-05-21 01:05:46 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-05-21 01:05:46 +0300 |
commit | 9a53f1a15bec5cf6559c3c78761424081a73c50e (patch) | |
tree | f8415d9443164e1d533630d3dd67b37aad52ac51 /src/gui | |
parent | 71d0606a0356e8f9a5fb605190aef7330b630b9e (diff) | |
download | manaverse-9a53f1a15bec5cf6559c3c78761424081a73c50e.tar.gz manaverse-9a53f1a15bec5cf6559c3c78761424081a73c50e.tar.bz2 manaverse-9a53f1a15bec5cf6559c3c78761424081a73c50e.tar.xz manaverse-9a53f1a15bec5cf6559c3c78761424081a73c50e.zip |
Fix removing home position from mouse and saving map objects/home position.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/popupmenu.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp index 9048c53b2..9577d6107 100644 --- a/src/gui/popupmenu.cpp +++ b/src/gui/popupmenu.cpp @@ -1090,11 +1090,17 @@ void PopupMenu::handleLink(const std::string &link, SpecialLayer *specialLayer = map->getSpecialLayer(); if (specialLayer) { + bool isHome = (mMapItem->getType() == MapItem::HOME); const int x = mMapItem->getX(); const int y = mMapItem->getY(); specialLayer->setTile(x, y, MapItem::EMPTY); if (socialWindow) socialWindow->removePortal(x, y); + if (isHome && player_node) + { + player_node->removeHome(); + player_node->saveHomes(); + } } } } |