mirror of
https://github.com/nzp-team/fteqw.git
synced 2025-01-31 20:50:47 +00:00
second attempt at ctrl+enter
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3122 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
c3e186ef7a
commit
32591b4df6
1 changed files with 24 additions and 20 deletions
|
@ -362,6 +362,7 @@ void Con_ExecuteLine(console_t *con, char *line)
|
||||||
{
|
{
|
||||||
qboolean waschat = false;
|
qboolean waschat = false;
|
||||||
|
|
||||||
|
con_commandmatch=1;
|
||||||
if (cls.state >= ca_connected && cl_chatmode.value == 2)
|
if (cls.state >= ca_connected && cl_chatmode.value == 2)
|
||||||
{
|
{
|
||||||
waschat = true;
|
waschat = true;
|
||||||
|
@ -372,27 +373,30 @@ void Con_ExecuteLine(console_t *con, char *line)
|
||||||
else
|
else
|
||||||
waschat = false;
|
waschat = false;
|
||||||
}
|
}
|
||||||
|
if (waschat)
|
||||||
con_commandmatch=1;
|
Cbuf_AddText (line, RESTRICT_LOCAL);
|
||||||
if (line[0] == '\\' || line[0] == '/')
|
else
|
||||||
Cbuf_AddText (line+1, RESTRICT_LOCAL); // skip the >
|
{
|
||||||
else if (cl_chatmode.value == 2 && Cmd_IsCommand(line))
|
if (line[0] == '\\' || line[0] == '/')
|
||||||
Cbuf_AddText (line, RESTRICT_LOCAL); // valid command
|
Cbuf_AddText (line+1, RESTRICT_LOCAL); // skip the >
|
||||||
#ifdef Q2CLIENT
|
else if (cl_chatmode.value == 2 && Cmd_IsCommand(line))
|
||||||
else if (cls.protocol == CP_QUAKE2)
|
Cbuf_AddText (line, RESTRICT_LOCAL); // valid command
|
||||||
Cbuf_AddText (line, RESTRICT_LOCAL); // send the command to the server via console, and let the server convert to chat
|
#ifdef Q2CLIENT
|
||||||
#endif
|
else if (cls.protocol == CP_QUAKE2)
|
||||||
else if (*line)
|
Cbuf_AddText (line, RESTRICT_LOCAL); // send the command to the server via console, and let the server convert to chat
|
||||||
{ // convert to a chat message
|
#endif
|
||||||
if (!waschat && (cl_chatmode.value == 1 || ((cls.state >= ca_connected && cl_chatmode.value == 2) && (strncmp(line, "say ", 4)))))
|
else if (*line)
|
||||||
{
|
{ // convert to a chat message
|
||||||
if (keydown[K_CTRL])
|
if ((cl_chatmode.value == 1 || ((cls.state >= ca_connected && cl_chatmode.value == 2) && (strncmp(line, "say ", 4)))))
|
||||||
Cbuf_AddText ("say_team ", RESTRICT_LOCAL);
|
{
|
||||||
else
|
if (keydown[K_CTRL])
|
||||||
Cbuf_AddText ("say ", RESTRICT_LOCAL);
|
Cbuf_AddText ("say_team ", RESTRICT_LOCAL);
|
||||||
waschat = true;
|
else
|
||||||
|
Cbuf_AddText ("say ", RESTRICT_LOCAL);
|
||||||
|
waschat = true;
|
||||||
|
}
|
||||||
|
Cbuf_AddText (line, RESTRICT_LOCAL); // skip the >
|
||||||
}
|
}
|
||||||
Cbuf_AddText (line, RESTRICT_LOCAL); // skip the >
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Cbuf_AddText ("\n", RESTRICT_LOCAL);
|
Cbuf_AddText ("\n", RESTRICT_LOCAL);
|
||||||
|
|
Loading…
Reference in a new issue