Skip to content

Commit 908d91f

Browse files
committed
disable right click on gores mode keyreader
1 parent 2b1864e commit 908d91f

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

src/game/client/components/entity/entity.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,8 @@ void CEClient::GoresModeSave()
259259

260260
const CBindSlot BindSlot = GameClient()->m_Binds.GetBindSlot(pKeyName);
261261
const char *pBind = GameClient()->m_Binds.GetKeyBinding(BindSlot.m_ModifierMask, BindSlot.m_Key);
262+
if(!pBind)
263+
return;
262264
str_copy(g_Config.m_ClGoresModeSaved, pBind);
263265

264266
GameClient()->m_Binds.Bind(Key, "+fire;+prevweapon");

src/game/client/components/key_binder.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,17 +102,13 @@ CKeyBinder::CKeyReaderResult CKeyBinder::DoKeyReader(CButtonContainer *pReaderBu
102102
CUIRect KeyReaderButton, ClearButton;
103103
pRect->VSplitRight(pRect->h, &KeyReaderButton, &ClearButton);
104104

105-
const int ButtonResult = Ui()->DoButtonLogic(pReaderButton, 0, &KeyReaderButton, BUTTONFLAG_LEFT | BUTTONFLAG_RIGHT);
105+
const int ButtonResult = Ui()->DoButtonLogic(pReaderButton, 0, &KeyReaderButton, BUTTONFLAG_LEFT);
106106
if(ButtonResult == 1 || Activate)
107107
{
108108
m_pKeyReaderId = pReaderButton;
109109
m_TakeKey = true;
110110
m_Key = std::nullopt;
111111
}
112-
else if(ButtonResult == 2)
113-
{
114-
Result.m_Bind = CBindSlot(KEY_UNKNOWN, KeyModifier::NONE);
115-
}
116112

117113
if(m_pKeyReaderId == pReaderButton && m_Key.has_value())
118114
{

0 commit comments

Comments
 (0)