]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - keys.c
add a half-baked "commandmode" (currently it has, like messagemode, no history, no...
[xonotic/darkplaces.git] / keys.c
diff --git a/keys.c b/keys.c
index 2374781c8df937b078329a4046782b46084ae3da..81cc1beeac5aee48df0e81b26a052145e3a7c154 100644 (file)
--- a/keys.c
+++ b/keys.c
@@ -523,7 +523,7 @@ Key_Console (int key, char ascii)
 
 //============================================================================
 
-qboolean       chat_team;
+int chat_mode;
 char           chat_buffer[MAX_INPUTLINE];
 unsigned int   chat_bufferlen = 0;
 
@@ -535,7 +535,10 @@ Key_Message (int key, char ascii)
 
        if (key == K_ENTER || ascii == 10 || ascii == 13)
        {
-               Cmd_ForwardStringToServer(va("%s %s", chat_team ? "say_team" : "say ", chat_buffer));
+               if(chat_mode < 0)
+                       Cbuf_AddText(va("%s\n", chat_buffer));
+               else
+                       Cmd_ForwardStringToServer(va("%s %s", chat_mode ? "say_team" : "say ", chat_buffer));
 
                key_dest = key_game;
                chat_bufferlen = 0;
@@ -543,6 +546,8 @@ Key_Message (int key, char ascii)
                return;
        }
 
+       // TODO add support for arrow keys and simple editing
+
        if (key == K_ESCAPE) {
                key_dest = key_game;
                chat_bufferlen = 0;