From: cloudwalk Date: Wed, 27 May 2020 01:07:28 +0000 (+0000) Subject: Fix major regression preventing connect to any server using curl for custom CSQC X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=63f63b8fdbc839ab5da9f3eccda24817d4ebc7be;p=xonotic%2Fdarkplaces.git Fix major regression preventing connect to any server using curl for custom CSQC The command interpreters must be executed in sequence with clientfromserver being the first, otherwise curl won't get a chance to run before the client continues connecting. A few more commands were also missing from the interpreter and were added. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12595 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/cl_parse.c b/cl_parse.c index a29f0fea..45bd0137 100644 --- a/cl_parse.c +++ b/cl_parse.c @@ -4312,8 +4312,11 @@ void CL_Parse_Init(void) Cmd_AddCommand(&cmd_client, "changing", QW_CL_Changing_f, "sent by qw servers to tell client to wait for level change"); Cmd_AddCommand(&cmd_client, "cl_begindownloads", CL_BeginDownloads_f, "used internally by darkplaces client while connecting (causes loading of models and sounds or triggers downloads for missing ones)"); Cmd_AddCommand(&cmd_client, "cl_downloadbegin", CL_DownloadBegin_f, "(networking) informs client of download file information, client replies with sv_startsoundload to begin the transfer"); + Cmd_AddCommand(&cmd_clientfromserver, "cl_downloadbegin", CL_DownloadBegin_f, "(networking) informs client of download file information, client replies with sv_startsoundload to begin the transfer"); Cmd_AddCommand(&cmd_client, "stopdownload", CL_StopDownload_f, "terminates a download"); + Cmd_AddCommand(&cmd_clientfromserver, "stopdownload", CL_StopDownload_f, "terminates a download"); Cmd_AddCommand(&cmd_client, "cl_downloadfinished", CL_DownloadFinished_f, "signals that a download has finished and provides the client with file size and crc to check its integrity"); + Cmd_AddCommand(&cmd_clientfromserver, "cl_downloadfinished", CL_DownloadFinished_f, "signals that a download has finished and provides the client with file size and crc to check its integrity"); Cmd_AddCommand(&cmd_client, "iplog_list", CL_IPLog_List_f, "lists names of players whose IP address begins with the supplied text (example: iplog_list 123.456.789)"); } diff --git a/host.c b/host.c index 1b4f546d..03375f69 100644 --- a/host.c +++ b/host.c @@ -781,6 +781,7 @@ void Host_Main(void) // process console commands // R_TimeReport("preconsole"); CL_VM_PreventInformationLeaks(); + Cbuf_Frame(&cmd_clientfromserver); Cbuf_Frame(&cmd_client); Cbuf_Frame(&cmd_server); @@ -789,11 +790,6 @@ void Host_Main(void) Cbuf_Frame(&cmd_serverfromclient); } - if(cls.netcon) - { - Cbuf_Frame(&cmd_clientfromserver); - } - // R_TimeReport("console"); }