3220: Fix overlapping of combined binds with modifiers [Fixes #3182] r=heinrich5991 a=Banana090

Just fixes https://github.com/ddnet/ddnet/issues/3182

Works as it used to work, but does not call for binds with no modifier when the same key was used already for modified bind


Co-authored-by: Дядя Женя <spy090@yandex.ru>
This commit is contained in:
bors[bot] 2020-11-02 20:49:12 +00:00 committed by GitHub
commit 37ccb77377
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -143,8 +143,7 @@ bool CBinds::OnInput(IInput::CEvent e)
} }
} }
// Shift for emoticons works while moving through map if(m_aapKeyBindings[0][e.m_Key] && !ret)
if(m_aapKeyBindings[0][e.m_Key] && (!ret || m_aapKeyBindings[0][e.m_Key][0] == '+'))
{ {
// When ctrl+shift are pressed (ctrl+shift binds and also the hard-coded ctrl+shift+d, ctrl+shift+g, ctrl+shift+e), ignore other +xxx binds // When ctrl+shift are pressed (ctrl+shift binds and also the hard-coded ctrl+shift+d, ctrl+shift+g, ctrl+shift+e), ignore other +xxx binds
if(e.m_Flags & IInput::FLAG_PRESS && Mask != ((1 << MODIFIER_CTRL) | (1 << MODIFIER_SHIFT))) if(e.m_Flags & IInput::FLAG_PRESS && Mask != ((1 << MODIFIER_CTRL) | (1 << MODIFIER_SHIFT)))