mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-01-21 00:41:05 +00:00
Fix '/connect $server' while connected to a server.
This commit is contained in:
parent
727249f625
commit
ed54fe2364
1 changed files with 3 additions and 9 deletions
|
@ -189,7 +189,7 @@ CL_CheckForResend(void)
|
||||||
void
|
void
|
||||||
CL_Connect_f(void)
|
CL_Connect_f(void)
|
||||||
{
|
{
|
||||||
char *server;
|
char server[256];
|
||||||
|
|
||||||
if (Cmd_Argc() != 2)
|
if (Cmd_Argc() != 2)
|
||||||
{
|
{
|
||||||
|
@ -197,6 +197,8 @@ CL_Connect_f(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Q_strlcpy(server, Cmd_Argv(1), sizeof(server));
|
||||||
|
|
||||||
if (Com_ServerState())
|
if (Com_ServerState())
|
||||||
{
|
{
|
||||||
/* if running a local server, kill it and reissue
|
/* if running a local server, kill it and reissue
|
||||||
|
@ -204,15 +206,7 @@ CL_Connect_f(void)
|
||||||
SV_Shutdown("Server quit\n", false);
|
SV_Shutdown("Server quit\n", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
|
||||||
{
|
|
||||||
CL_Disconnect();
|
|
||||||
}
|
|
||||||
|
|
||||||
server = Cmd_Argv(1);
|
|
||||||
|
|
||||||
NET_Config(true); /* allow remote */
|
NET_Config(true); /* allow remote */
|
||||||
|
|
||||||
CL_Disconnect();
|
CL_Disconnect();
|
||||||
|
|
||||||
cls.state = ca_connecting;
|
cls.state = ca_connecting;
|
||||||
|
|
Loading…
Reference in a new issue