mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Add setting to ignore clan in friends and enable by default
This commit is contained in:
parent
dfa804fb58
commit
3b0f768478
|
@ -73,7 +73,7 @@ bool CFriends::IsFriend(const char *pName, const char *pClan, bool PlayersOnly)
|
|||
unsigned ClanHash = str_quickhash(pClan);
|
||||
for(int i = 0; i < m_NumFriends; ++i)
|
||||
{
|
||||
if(m_aFriends[i].m_ClanHash == ClanHash &&
|
||||
if((g_Config.m_ClFriendsIgnoreClan || m_aFriends[i].m_ClanHash == ClanHash) &&
|
||||
((!PlayersOnly && m_aFriends[i].m_aName[0] == 0) || m_aFriends[i].m_NameHash == NameHash))
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -26,7 +26,8 @@ MACRO_CONFIG_INT(ClAutoDemoMax, cl_auto_demo_max, 10, 0, 1000, CFGFLAG_SAVE|CFGF
|
|||
MACRO_CONFIG_INT(ClAutoScreenshot, cl_auto_screenshot, 0, 0, 1, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Automatically take game over screenshot")
|
||||
MACRO_CONFIG_INT(ClAutoScreenshotMax, cl_auto_screenshot_max, 10, 0, 1000, CFGFLAG_SAVE|CFGFLAG_CLIENT, "Maximum number of automatically created screenshots (0 = no limit)")
|
||||
MACRO_CONFIG_INT(ClResetWantedWeaponOnDeath, cl_reset_wanted_weapon_on_death, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Reset wanted weapon on death")
|
||||
MACRO_CONFIG_INT(ClPrintBroadcasts, cl_print_broadcasts, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Print broadcasts into console")
|
||||
MACRO_CONFIG_INT(ClPrintBroadcasts, cl_print_broadcasts, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Print broadcasts to console")
|
||||
MACRO_CONFIG_INT(ClFriendsIgnoreClan, cl_friends_ignore_clan, 1, 0, 1, CFGFLAG_CLIENT|CFGFLAG_SAVE, "Ignore clan tag when searching for friends")
|
||||
|
||||
MACRO_CONFIG_INT(ClEventthread, cl_eventthread, 0, 0, 1, CFGFLAG_CLIENT, "Enables the usage of a thread to pump the events")
|
||||
|
||||
|
|
|
@ -203,6 +203,13 @@ void CMenus::RenderSettingsGeneral(CUIRect MainView)
|
|||
g_Config.m_ClPrintBroadcasts ^= 1;
|
||||
}
|
||||
|
||||
Right.HSplitTop(5.0f, 0, &Right);
|
||||
Right.HSplitTop(20.0f, &Button, &Right);
|
||||
if (DoButton_CheckBox(&g_Config.m_ClFriendsIgnoreClan, Localize("Ignore clan tag for friends"), g_Config.m_ClFriendsIgnoreClan, &Button))
|
||||
{
|
||||
g_Config.m_ClFriendsIgnoreClan ^= 1;
|
||||
}
|
||||
|
||||
Left.HSplitTop(20.0f, 0, &Left);
|
||||
Left.HSplitTop(20.0f, &Label, &Left);
|
||||
Button.VSplitRight(20.0f, &Button, 0);
|
||||
|
@ -217,7 +224,7 @@ void CMenus::RenderSettingsGeneral(CUIRect MainView)
|
|||
g_Config.m_ClCpuThrottle= static_cast<int>(DoScrollbarH(&g_Config.m_ClCpuThrottle, &Button, g_Config.m_ClCpuThrottle/100.0f)*100.0f+0.1f);
|
||||
}
|
||||
|
||||
Left.HSplitTop(20.0f, 0, &Left);
|
||||
Left.HSplitTop(30.0f, 0, &Left);
|
||||
Left.HSplitTop(20.0f, &Button, &Left);
|
||||
if (DoButton_CheckBox(&g_Config.m_ClCpuThrottleInactive, Localize("CPU Throttle when window is inactive"), g_Config.m_ClCpuThrottleInactive, &Button))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue