diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/hu_stuff.c | 22 | ||||
-rw-r--r-- | src/m_config.c | 35 |
2 files changed, 46 insertions, 11 deletions
diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 1381532d..afe3974c 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -88,6 +88,16 @@ char* player_names[] = HUSTR_PLRRED }; +int key_multi_msg = HU_INPUTTOGGLE; + +int key_multi_msgplayer[MAXPLAYERS] = +{ + HUSTR_KEYGREEN, + HUSTR_KEYINDIGO, + HUSTR_KEYBROWN, + HUSTR_KEYRED +}; + int key_message_refresh = KEY_ENTER; char chat_char; // remove later. @@ -572,14 +582,6 @@ boolean HU_Responder(event_t *ev) int i; int numplayers; - static char destination_keys[MAXPLAYERS] = - { - HUSTR_KEYGREEN, - HUSTR_KEYINDIGO, - HUSTR_KEYBROWN, - HUSTR_KEYRED - }; - static int num_nobrainers = 0; numplayers = 0; @@ -608,7 +610,7 @@ boolean HU_Responder(event_t *ev) message_counter = HU_MSGTIMEOUT; eatkey = true; } - else if (netgame && ev->data2 == HU_INPUTTOGGLE) + else if (netgame && ev->data2 == key_multi_msg) { eatkey = chat_on = true; HUlib_resetIText(&w_chat); @@ -618,7 +620,7 @@ boolean HU_Responder(event_t *ev) { for (i=0; i<MAXPLAYERS ; i++) { - if (ev->data2 == destination_keys[i]) + if (ev->data2 == key_multi_msgplayer[i]) { if (playeringame[i] && i!=consoleplayer) { diff --git a/src/m_config.c b/src/m_config.c index d0fe6808..ef9c97e8 100644 --- a/src/m_config.c +++ b/src/m_config.c @@ -150,7 +150,10 @@ extern int key_weapon8; extern int key_message_refresh; extern int key_demo_quit; - + +extern int key_multi_msg; +extern int key_multi_msgplayer[]; + extern int mousebfire; extern int mousebstrafe; extern int mousebforward; @@ -1048,6 +1051,36 @@ static default_t extra_defaults_list[] = // CONFIG_VARIABLE_KEY(key_demo_quit, key_demo_quit), + + //! + // Key to send a message during multiplayer games. + // + + CONFIG_VARIABLE_KEY(key_multi_msg, key_multi_msg), + + //! + // Key to send a message to the green player during multiplayer games. + // + + CONFIG_VARIABLE_KEY(key_multi_msgplayer1, key_multi_msgplayer[0]), + + //! + // Key to send a message to the indigo player during multiplayer games. + // + + CONFIG_VARIABLE_KEY(key_multi_msgplayer2, key_multi_msgplayer[1]), + + //! + // Key to send a message to the brown player during multiplayer games. + // + + CONFIG_VARIABLE_KEY(key_multi_msgplayer3, key_multi_msgplayer[2]), + + //! + // Key to send a message to the red player during multiplayer games. + // + + CONFIG_VARIABLE_KEY(key_multi_msgplayer4, key_multi_msgplayer[3]), }; static default_collection_t extra_defaults = |