mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
Unbind default bindings before loading stored bindings (new cvar cfg_unbindall)
This commit is contained in:
parent
7637d32f6f
commit
f36f708b24
1 changed files with 10 additions and 0 deletions
|
@ -29,6 +29,8 @@
|
|||
|
||||
#include "header/client.h"
|
||||
|
||||
static cvar_t *cfg_unbindall;
|
||||
|
||||
/*
|
||||
* key up events are sent even if in console mode
|
||||
*/
|
||||
|
@ -760,6 +762,11 @@ Key_WriteBindings(FILE *f)
|
|||
{
|
||||
int i;
|
||||
|
||||
if (cfg_unbindall->value)
|
||||
{
|
||||
fprintf(f, "unbindall\n");
|
||||
}
|
||||
|
||||
for (i = 0; i < K_LAST; i++)
|
||||
{
|
||||
if (keybindings[i] && keybindings[i][0])
|
||||
|
@ -875,6 +882,9 @@ Key_Init(void)
|
|||
menubound[K_F1 + i] = true;
|
||||
}
|
||||
|
||||
/* register our variables */
|
||||
cfg_unbindall = Cvar_Get("cfg_unbindall", "1", CVAR_ARCHIVE);
|
||||
|
||||
/* register our functions */
|
||||
Cmd_AddCommand("bind", Key_Bind_f);
|
||||
Cmd_AddCommand("unbind", Key_Unbind_f);
|
||||
|
|
Loading…
Reference in a new issue