summaryrefslogtreecommitdiff
path: root/src/gui/popupmenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/popupmenu.cpp')
-rw-r--r--src/gui/popupmenu.cpp6
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();
+ }
}
}
}