summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--setup/configfile.c1
-rw-r--r--setup/keyboard.c4
-rw-r--r--setup/keyboard.h1
-rw-r--r--src/g_game.c3
-rw-r--r--src/m_config.c7
5 files changed, 14 insertions, 2 deletions
diff --git a/setup/configfile.c b/setup/configfile.c
index 6db7f710..5fe1d958 100644
--- a/setup/configfile.c
+++ b/setup/configfile.c
@@ -314,6 +314,7 @@ static default_t extra_defaults_list[] =
{"key_menu_qload", &key_menu_qload, DEFAULT_KEY, 0, 0},
{"key_menu_quit", &key_menu_quit, DEFAULT_KEY, 0, 0},
{"key_menu_gamma", &key_menu_gamma, DEFAULT_KEY, 0, 0},
+ {"key_spy", &key_spy, DEFAULT_KEY, 0, 0},
{"key_menu_incscreen", &key_menu_incscreen, DEFAULT_KEY, 0, 0},
{"key_menu_decscreen", &key_menu_decscreen, DEFAULT_KEY, 0, 0},
diff --git a/setup/keyboard.c b/setup/keyboard.c
index f16c0940..bcf5ec7a 100644
--- a/setup/keyboard.c
+++ b/setup/keyboard.c
@@ -64,6 +64,7 @@ int key_menu_messages = KEY_F8;
int key_menu_qload = KEY_F9;
int key_menu_quit = KEY_F10;
int key_menu_gamma = KEY_F11;
+int key_spy = KEY_F12;
int key_menu_incscreen = KEY_EQUALS;
int key_menu_decscreen = KEY_MINUS;
@@ -116,7 +117,7 @@ static int *menu_nav[] = { &key_menu_activate, &key_menu_up, &key_menu_down,
static int *shortcuts[] = { &key_menu_help, &key_menu_save, &key_menu_load,
&key_menu_volume, &key_menu_detail, &key_menu_qsave,
- &key_menu_endgame, &key_menu_messages,
+ &key_menu_endgame, &key_menu_messages, &key_spy,
&key_menu_qload, &key_menu_quit, &key_menu_gamma,
&key_menu_incscreen, &key_menu_decscreen,
&key_message_refresh, &key_multi_msg,
@@ -274,6 +275,7 @@ static void OtherKeysDialog(TXT_UNCAST_ARG(widget), TXT_UNCAST_ARG(unused))
AddKeyControl(table, "Quick load", &key_menu_qload);
AddKeyControl(table, "Quit game", &key_menu_quit);
AddKeyControl(table, "Toggle gamma", &key_menu_gamma);
+ AddKeyControl(table, "Multiplayer spy", &key_spy);
AddKeyControl(table, "Increase screen size", &key_menu_incscreen);
AddKeyControl(table, "Decrease screen size", &key_menu_decscreen);
diff --git a/setup/keyboard.h b/setup/keyboard.h
index feeb9cf8..f934116f 100644
--- a/setup/keyboard.h
+++ b/setup/keyboard.h
@@ -65,6 +65,7 @@ extern int key_menu_messages;
extern int key_menu_qload;
extern int key_menu_quit;
extern int key_menu_gamma;
+extern int key_spy;
extern int key_menu_incscreen;
extern int key_menu_decscreen;
diff --git a/src/g_game.c b/src/g_game.c
index a9ee2641..701b98d5 100644
--- a/src/g_game.c
+++ b/src/g_game.c
@@ -185,6 +185,7 @@ int key_weapon8 = '8';
int key_pause = KEY_PAUSE;
int key_demo_quit = 'q';
+int key_spy = KEY_F12;
int mousebfire = 0;
int mousebstrafe = 1;
@@ -740,7 +741,7 @@ boolean G_Responder (event_t* ev)
{
// allow spy mode changes even during the demo
if (gamestate == GS_LEVEL && ev->type == ev_keydown
- && ev->data1 == KEY_F12 && (singledemo || !deathmatch) )
+ && ev->data1 == key_spy && (singledemo || !deathmatch) )
{
// spy mode
do
diff --git a/src/m_config.c b/src/m_config.c
index 8744e98a..b2e52e7f 100644
--- a/src/m_config.c
+++ b/src/m_config.c
@@ -122,6 +122,7 @@ extern int key_menu_messages;
extern int key_menu_qload;
extern int key_menu_quit;
extern int key_menu_gamma;
+extern int key_spy;
extern int key_menu_incscreen;
extern int key_menu_decscreen;
@@ -923,6 +924,12 @@ static default_t extra_defaults_list[] =
CONFIG_VARIABLE_KEY(key_menu_gamma, key_menu_gamma),
//!
+ // Keyboard shortcut to switch view in multiplayer.
+ //
+
+ CONFIG_VARIABLE_KEY(key_spy, key_spy),
+
+ //!
// Keyboard shortcut to increase the screen size.
//