Changed: Config option to disable /tar for changing compass target.

--HG--
branch : develop
feature/streamed-package
Nimetu 5 years ago
parent 25d04f65bd
commit 076d4b73c1

@ -614,6 +614,8 @@ CClientConfig::CClientConfig()
MaxMapScale = 2.0f;
R2EDMaxMapScale = 8.0f;
TargetChangeCompass = true;
// VERBOSES
VerboseVP = false;
VerboseAnimUser = false;
@ -1495,6 +1497,9 @@ void CClientConfig::setValues()
READ_FLOAT_FV(MaxMapScale);
READ_FLOAT_FV(R2EDMaxMapScale);
// /tar to update compass or not
READ_BOOL_FV(TargetChangeCompass);
/////////////
// SHADOWS //
// Shadows : Get Shadows state

@ -607,6 +607,9 @@ struct CClientConfig
float MaxMapScale;
float R2EDMaxMapScale;
// If successfull /tar command should set compass or not
bool TargetChangeCompass;
//////////////
// VERBOSES //
bool VerboseVP;

@ -2476,6 +2476,8 @@ class CAHTarget : public IActionHandler
if (entity && entity->properties().selectable() && !entity->getDisplayName().empty())
{
UserEntity->selection(entity->slot());
if (ClientCfg.TargetChangeCompass)
{
CGroupCompas *gc = dynamic_cast<CGroupCompas *>(CWidgetManager::getInstance()->getElementFromId("ui:interface:compass"));
if (gc)
{
@ -2488,6 +2490,7 @@ class CAHTarget : public IActionHandler
CWidgetManager::getInstance()->setTopWindow(gc);
}
}
}
else if (!quiet)
{
CInterfaceManager::getInstance()->displaySystemInfo(CI18N::get("uiTargetErrorCmd"));

Loading…
Cancel
Save