From 9a53f1a15bec5cf6559c3c78761424081a73c50e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 21 May 2011 01:05:46 +0300 Subject: Fix removing home position from mouse and saving map objects/home position. --- src/gui/popupmenu.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/gui/popupmenu.cpp') 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(); + } } } } -- cgit v1.2.3-60-g2f50