Skip to content

Commit

Permalink
Fix clearing keys for control in Team Arena UI
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
zturtleman committed Apr 26, 2018
1 parent 1caf1fb commit 45f8512
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions code/ui/ui_shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -3547,8 +3547,14 @@ qboolean Item_Bind_HandleKey(itemDef_t *item, int key, qboolean down) {
case K_BACKSPACE:
id = BindingIDFromName(item->cvar);
if (id != -1) {
g_bindings[id].bind1 = -1;
g_bindings[id].bind2 = -1;
if( g_bindings[id].bind1 != -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);
g_waitingForKey = qfalse;
Expand Down

0 comments on commit 45f8512

Please sign in to comment.