X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=console.c;h=b604fe139a0a7e7952628c11314d6791c627fc69;hb=ab9e8a37699390a5dc199e4def9cdbaaa59d82cf;hp=db3718c350ce2494881f32e19a91cdd9e052d4f3;hpb=1924597d6da3804cb976cf555735929293d75957;p=xonotic%2Fdarkplaces.git diff --git a/console.c b/console.c index db3718c3..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,11 +2832,11 @@ 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) { - Con_Printf("%s/\n", dirbuf.strings[i]); + Con_Printf("^4%s^7/\n", dirbuf.strings[i]); } for(i = 0; i < resultbuf.numstrings; ++i) {