X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=console.c;h=b604fe139a0a7e7952628c11314d6791c627fc69;hb=2b75d82853369832232c5e7e4c93d2d673cecd0c;hp=ae73809b9d8decedd2274775a520f37f270a88bb;hpb=9c8b4bcf2b8614917b5a79f5cf7f4c30e76d7e85;p=xonotic%2Fdarkplaces.git diff --git a/console.c b/console.c index ae73809b..b604fe13 100644 --- a/console.c +++ b/console.c @@ -596,6 +596,10 @@ Con_ToggleConsole_f */ void Con_ToggleConsole_f (void) { + if (COM_CheckParm ("-noconsole")) + if (!(key_consoleactive & KEY_CONSOLEACTIVE_USER)) + return; // only allow the key bind to turn off console + // toggle the 'user wants console' bit key_consoleactive ^= KEY_CONSOLEACTIVE_USER; Con_ClearNotify(); @@ -623,8 +627,11 @@ void Con_MessageMode_f (void) { key_dest = key_message; chat_mode = 0; // "say" - chat_bufferlen = 0; - chat_buffer[0] = 0; + if(Cmd_Argc() > 1) + { + dpsnprintf(chat_buffer, sizeof(chat_buffer), "%s ", Cmd_Args()); + chat_bufferlen = strlen(chat_buffer); + } } @@ -637,8 +644,11 @@ void Con_MessageMode2_f (void) { key_dest = key_message; chat_mode = 1; // "say_team" - chat_bufferlen = 0; - chat_buffer[0] = 0; + if(Cmd_Argc() > 1) + { + dpsnprintf(chat_buffer, sizeof(chat_buffer), "%s ", Cmd_Args()); + chat_bufferlen = strlen(chat_buffer); + } } /* @@ -2822,7 +2832,7 @@ void Con_CompleteCommandLine (void) } else { - stringlistsort(&resultbuf); // dirbuf is already sorted + stringlistsort(&resultbuf, true); // dirbuf is already sorted Con_Printf("\n%i possible filenames\n", resultbuf.numstrings + dirbuf.numstrings); for(i = 0; i < dirbuf.numstrings; ++i) {