*/
void Host_Reconnect_f (void)
{
- if (cmd_source == src_command)
- {
- Con_Print("reconnect is not valid from the console\n");
- return;
- }
- if (Cmd_Argc() != 1)
+ if (cls.protocol == PROTOCOL_QUAKEWORLD)
{
- Con_Print("reconnect : wait for signon messages again\n");
- return;
+ if (cls.qw_downloadmemory) // don't change when downloading
+ return;
+
+ S_StopAllSounds();
+
+ if (cls.netcon)
+ {
+ if (cls.state == ca_connected && cls.signon < SIGNONS)
+ {
+ Con_Printf("reconnecting...\n");
+ MSG_WriteChar(&cls.netcon->message, qw_clc_stringcmd);
+ MSG_WriteString(&cls.netcon->message, "new");
+ }
+ else
+ Con_Printf("Please use connect instead (reconnect not implemented)\n");
+ }
}
- if (!cls.signon)
+ else
{
- //Con_Print("reconnect: no signon, ignoring reconnect\n");
- return;
+ if (Cmd_Argc() != 1)
+ {
+ Con_Print("reconnect : wait for signon messages again\n");
+ return;
+ }
+ if (!cls.signon)
+ {
+ Con_Print("reconnect: no signon, ignoring reconnect\n");
+ return;
+ }
+ cls.signon = 0; // need new connection messages
}
- cls.signon = 0; // need new connection messages
}
/*
// QuakeWorld commands
-char qw_emodel_name[] =
- { 'e' ^ 0xff, 'm' ^ 0xff, 'o' ^ 0xff, 'd' ^ 0xff, 'e' ^ 0xff, 'l' ^ 0xff, 0 };
-char qw_pmodel_name[] =
- { 'p' ^ 0xff, 'm' ^ 0xff, 'o' ^ 0xff, 'd' ^ 0xff, 'e' ^ 0xff, 'l' ^ 0xff, 0 };
-char qw_prespawn_name[] =
- { 'p'^0xff, 'r'^0xff, 'e'^0xff, 's'^0xff, 'p'^0xff, 'a'^0xff, 'w'^0xff, 'n'^0xff,
- ' '^0xff, '%'^0xff, 'i'^0xff, ' '^0xff, '0'^0xff, ' '^0xff, '%'^0xff, 'i'^0xff, 0 };
-char qw_modellist_name[] =
- { 'm'^0xff, 'o'^0xff, 'd'^0xff, 'e'^0xff, 'l'^0xff, 'l'^0xff, 'i'^0xff, 's'^0xff, 't'^0xff,
- ' '^0xff, '%'^0xff, 'i'^0xff, ' '^0xff, '%'^0xff, 'i'^0xff, 0 };
-char qw_soundlist_name[] =
- { 's'^0xff, 'o'^0xff, 'u'^0xff, 'n'^0xff, 'd'^0xff, 'l'^0xff, 'i'^0xff, 's'^0xff, 't'^0xff,
- ' '^0xff, '%'^0xff, 'i'^0xff, ' '^0xff, '%'^0xff, 'i'^0xff, 0 };
-
/*
=====================
Host_Rcon_f
// TODO: shouldn't this be a cvar instead?
void Host_FullServerinfo_f (void) // credit: taken from QuakeWorld
{
+ char temp[512];
if (Cmd_Argc() != 2)
{
Con_Printf ("usage: fullserverinfo <complete info string>\n");
}
strlcpy (cl.qw_serverinfo, Cmd_Argv(1), sizeof(cl.qw_serverinfo));
+ InfoString_GetValue(cl.qw_serverinfo, "teamplay", temp, sizeof(temp));
+ cl.qw_teamplay = atoi(temp);
}
/*
if (*s)
s++;
- if (!strcasecmp(key, qw_pmodel_name) || !strcasecmp(key, qw_emodel_name))
+ if (!strcasecmp(key, "pmodel") || !strcasecmp(key, "emodel"))
continue;
if (key[0] == '*')
Con_Printf ("usage: setinfo [ <key> <value> ]\n");
return;
}
- if (!strcasecmp(Cmd_Argv(1), qw_pmodel_name) || !strcasecmp(Cmd_Argv(1), qw_emodel_name))
+ if (!strcasecmp(Cmd_Argv(1), "pmodel") || !strcasecmp(Cmd_Argv(1), "emodel"))
return;
if (Cmd_Argv(1)[0] == '*')
{