From: divverent Date: Sun, 13 Jul 2008 16:37:14 +0000 (+0000) Subject: preserve host_client during rcon (should fix crash for rcon restart) X-Git-Tag: xonotic-v0.1.0preview~2180 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0638b271010848e6e75e2f04aa8c2b8207775e59;p=xonotic%2Fdarkplaces.git preserve host_client during rcon (should fix crash for rcon restart) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8400 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/netconn.c b/netconn.c index e21c7152..7ea599c7 100755 --- a/netconn.c +++ b/netconn.c @@ -2244,7 +2244,12 @@ static int NetConn_ServerParsePacket(lhnetsocket_t *mysocket, unsigned char *dat { size_t l = strlen(s); if(l) + { + client_t *host_client_save = host_client; Cmd_ExecuteString(s, src_command); + host_client = host_client_save; + // in case it is a command that changes host_client (like restart) + } s += l + 1; } rcon_redirect_buffer[rcon_redirect_bufferpos] = 0;