1
0
Fork 0
forked from fte/fteqw

Slightly better handling of .qtv files.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3038 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2008-10-05 02:56:11 +00:00
parent 0a4c047eec
commit a44068f9b4

View file

@ -1770,22 +1770,22 @@ void CL_QTVPlay_f (void)
{ {
for (s = buffer + strlen(buffer)-1; s >= buffer; s--) for (s = buffer + strlen(buffer)-1; s >= buffer; s--)
{ {
if (*s == '\r' || *s == '\n') if (*s == '\r' || *s == '\n' || *s == ';')
*s = 0; *s = 0;
else else
break; break;
} }
s = buffer+8; s = buffer+7;
while(*s && *s <= ' ') while(*s && *s <= ' ')
s++; s++;
Cbuf_AddText(va("qtvplay \"%s\"\n", s), Cmd_ExecLevel); Cbuf_AddText(va("qtvplay \"%s\"\n", s), Cmd_ExecLevel);
break; break;
} }
if (!strncmp(buffer, "Join=", 7) || !strncmp(buffer, "Join:", 7)) if (!strncmp(buffer, "Connect=", 8) || !strncmp(buffer, "Connect:", 8))
{ {
for (s = buffer + strlen(buffer)-1; s >= buffer; s--) for (s = buffer + strlen(buffer)-1; s >= buffer; s--)
{ {
if (*s == '\r' || *s == '\n') if (*s == '\r' || *s == '\n' || *s == ';')
*s = 0; *s = 0;
else else
break; break;
@ -1793,14 +1793,29 @@ void CL_QTVPlay_f (void)
s = buffer+8; s = buffer+8;
while(*s && *s <= ' ') while(*s && *s <= ' ')
s++; s++;
Cbuf_AddText(va("join \"%s\"\n", s), Cmd_ExecLevel); Cbuf_AddText(va("connect \"%s\"\n", s), Cmd_ExecLevel);
break; break;
} }
if (!strncmp(buffer, "Observe=", 7) || !strncmp(buffer, "Observe:", 7)) if (!strncmp(buffer, "Join=", 5) || !strncmp(buffer, "Join:", 5))
{ {
for (s = buffer + strlen(buffer)-1; s >= buffer; s--) for (s = buffer + strlen(buffer)-1; s >= buffer; s--)
{ {
if (*s == '\r' || *s == '\n') if (*s == '\r' || *s == '\n' || *s == ';')
*s = 0;
else
break;
}
s = buffer+5;
while(*s && *s <= ' ')
s++;
Cbuf_AddText(va("join \"%s\"\n", s), Cmd_ExecLevel);
break;
}
if (!strncmp(buffer, "Observe=", 8) || !strncmp(buffer, "Observe:", 8))
{
for (s = buffer + strlen(buffer)-1; s >= buffer; s--)
{
if (*s == '\r' || *s == '\n' || *s == ';')
*s = 0; *s = 0;
else else
break; break;