Changed: Switch compass to target mode after successful /tar command.

--HG--
branch : develop
Nimetu 5 years ago
parent a5aa8e48a5
commit 11150e6b79

@ -53,6 +53,7 @@
#include "action_handler_tools.h" #include "action_handler_tools.h"
#include "../connection.h" #include "../connection.h"
#include "../client_chat_manager.h" #include "../client_chat_manager.h"
#include "group_compas.h"
// Game specific includes // Game specific includes
#include "../motion/user_controls.h" #include "../motion/user_controls.h"
@ -2472,6 +2473,17 @@ class CAHTarget : public IActionHandler
if (entity && entity->properties().selectable() && !entity->getDisplayName().empty()) if (entity && entity->properties().selectable() && !entity->getDisplayName().empty())
{ {
UserEntity->selection(entity->slot()); UserEntity->selection(entity->slot());
CGroupCompas *gc = dynamic_cast<CGroupCompas *>(CWidgetManager::getInstance()->getElementFromId("ui:interface:compass"));
if (gc)
{
CCompassTarget ct;
ct.setType(CCompassTarget::Selection);
gc->setActive(true);
gc->setTarget(ct);
gc->blink();
CWidgetManager::getInstance()->setTopWindow(gc);
}
} }
else if (!quiet) else if (!quiet)
{ {

Loading…
Cancel
Save