- If the player doesn't have ` bound to open the console, don't close it with that key.

This commit is contained in:
Braden Obrzut 2014-01-18 16:20:52 -05:00
parent 919b928300
commit 75fd674d31
2 changed files with 8 additions and 0 deletions

View file

@ -41,6 +41,7 @@
#include "version.h"
#include "g_game.h"
#include "c_bind.h"
#include "c_console.h"
#include "c_cvars.h"
#include "c_dispatch.h"
@ -1698,6 +1699,12 @@ static bool C_HandleKey (event_t *ev, BYTE *buffer, int len)
break;
case '`':
// Check to see if we have ` bound to the console before accepting
// it as a way to close the console.
if (Bindings.GetBinding(KEY_GRAVE).CompareNoCase("toggleconsole"))
{
break;
}
case GK_ESCAPE:
// Close console and clear command line. But if we're in the
// fullscreen console mode, there's nothing to fall back on

View file

@ -130,6 +130,7 @@ enum ESkillLevels
#define KEY_F10 0x44 // DIK_F10
#define KEY_F11 0x57 // DIK_F11
#define KEY_F12 0x58 // DIK_F12
#define KEY_GRAVE 0x29 // DIK_GRAVE
#define KEY_BACKSPACE 0x0e // DIK_BACK