From 0638b271010848e6e75e2f04aa8c2b8207775e59 Mon Sep 17 00:00:00 2001 From: divverent Date: Sun, 13 Jul 2008 16:37:14 +0000 Subject: [PATCH] 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 --- netconn.c | 5 +++++ 1 file changed, 5 insertions(+) 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; -- 2.39.2