useful for quick team communication binds (e.g. putting "Get the flag," in the message, and using tab completion to fill in the name who should do it)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11282
d7cf8633-e32d-0410-b094-
e92efae38249
::stable-branch::merge=
6d472eb4b897879d92a89416a5785a3fc78da3e7
{
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);
+ }
}
{
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);
+ }
}
/*