mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2025-01-06 00:40:43 +00:00
Fix clearing keys for control in Team Arena UI
When a control is selected for binding a key, pressing backspace would clear the displayed keys in the menu but not actually unbind the keys.
This commit is contained in:
parent
1caf1fb875
commit
45f8512f8e
1 changed files with 8 additions and 2 deletions
|
@ -3547,8 +3547,14 @@ qboolean Item_Bind_HandleKey(itemDef_t *item, int key, qboolean down) {
|
||||||
case K_BACKSPACE:
|
case K_BACKSPACE:
|
||||||
id = BindingIDFromName(item->cvar);
|
id = BindingIDFromName(item->cvar);
|
||||||
if (id != -1) {
|
if (id != -1) {
|
||||||
g_bindings[id].bind1 = -1;
|
if( g_bindings[id].bind1 != -1 ) {
|
||||||
g_bindings[id].bind2 = -1;
|
DC->setBinding( g_bindings[id].bind1, "" );
|
||||||
|
g_bindings[id].bind1 = -1;
|
||||||
|
}
|
||||||
|
if( g_bindings[id].bind2 != -1 ) {
|
||||||
|
DC->setBinding( g_bindings[id].bind2, "" );
|
||||||
|
g_bindings[id].bind2 = -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Controls_SetConfig(qtrue);
|
Controls_SetConfig(qtrue);
|
||||||
g_waitingForKey = qfalse;
|
g_waitingForKey = qfalse;
|
||||||
|
|
Loading…
Reference in a new issue