diff options
Diffstat (limited to 'src/gui/popupmenu.cpp')
-rw-r--r-- | src/gui/popupmenu.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp index c95864396..a7c008684 100644 --- a/src/gui/popupmenu.cpp +++ b/src/gui/popupmenu.cpp @@ -502,6 +502,11 @@ void PopupMenu::showPopup(int x, int y, MapItem *mapItem) mBrowserBox->addRow(strprintf("@@rename map|%s@@", _("Rename"))); mBrowserBox->addRow(strprintf("@@remove map|%s@@", _("Remove"))); + if (player_node && player_node->isGM()) + { + mBrowserBox->addRow("##3---"); + mBrowserBox->addRow(strprintf("@@warp map|%s@@", _("Warp"))); + } mBrowserBox->addRow("##3---"); mBrowserBox->addRow(strprintf("@@cancel|%s@@", _("Cancel"))); @@ -1144,6 +1149,14 @@ void PopupMenu::handleLink(const std::string &link, if (chatWindow) chatWindow->clearTab(); } + else if (link == "warp map" && mMapItem) + { + if (Game::instance()) + { + Net::getAdminHandler()->warp(Game::instance()->getCurrentMapName(), + mMapItem->getX(), mMapItem->getY()); + } + } else if (link == "remove map" && mMapItem) { if (viewport) |