diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 58179d4cd..139817d1b 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -2197,6 +2197,33 @@ void CL_TimeoutServerList(void) } #endif // ifndef NONET +static void CL_ConfirmConnect(void) +{ + if (totalfilesrequestednum > 0) + { +#ifdef HAVE_CURL + if (http_source[0] == '\0' || curl_failedwebdownload) +#endif + { + if (CL_SendRequestFile()) + { + cl_mode = CL_DOWNLOADFILES; + } + else + { + cl_mode = CL_LEGACYREQUESTFAILED; + } + } +#ifdef HAVE_CURL + else + cl_mode = CL_PREPAREHTTPFILES; +#endif + } + else + cl_mode = CL_LOADFILES; + +} + static void M_ConfirmConnect(event_t *ev) { #ifndef NONET @@ -2204,28 +2231,7 @@ static void M_ConfirmConnect(event_t *ev) { if (ev->data1 == ' ' || ev->data1 == 'y' || ev->data1 == KEY_ENTER || ev->data1 == gamecontrol[gc_accelerate][0] || ev->data1 == gamecontrol[gc_accelerate][1]) { - if (totalfilesrequestednum > 0) - { -#ifdef HAVE_CURL - if (http_source[0] == '\0' || curl_failedwebdownload) -#endif - { - if (CL_SendRequestFile()) - { - cl_mode = CL_DOWNLOADFILES; - } - else - { - cl_mode = CL_LEGACYREQUESTFAILED; - } - } -#ifdef HAVE_CURL - else - cl_mode = CL_PREPAREHTTPFILES; -#endif - } - else - cl_mode = CL_LOADFILES; + CL_ConfirmConnect(); M_ClearMenus(true); } @@ -2355,24 +2361,30 @@ static boolean CL_FinishedFileList(void) downloadsize = Z_StrDup(va("%uK",totalfilesrequestedsize>>10)); #endif - if (serverisfull) - M_StartMessage(va(M_GetText( - "This server is full!\n" - "Download of %s additional content is required to join.\n" - "\n" - "You may download, load server addons, and wait for a slot.\n" - "\n" - "Press ACCEL to continue or BRAKE to cancel.\n\n" - ), downloadsize), M_ConfirmConnect, MM_EVENTHANDLER); + if (cv_showdownloadprompt.value) + { + if (serverisfull) + M_StartMessage(va(M_GetText( + "This server is full!\n" + "Download of %s additional content is required to join.\n" + "\n" + "You may download, load server addons, and wait for a slot.\n" + "\n" + "Press ACCEL to continue or BRAKE to cancel.\n\n" + ), downloadsize), M_ConfirmConnect, MM_EVENTHANDLER); + else + M_StartMessage(va(M_GetText( + "Download of %s additional content is required to join.\n" + "\n" + "Press ACCEL to continue or BRAKE to cancel.\n\n" + ), downloadsize), M_ConfirmConnect, MM_EVENTHANDLER); + + cl_mode = CL_CONFIRMCONNECT; + } else - M_StartMessage(va(M_GetText( - "Download of %s additional content is required to join.\n" - "\n" - "Press ACCEL to continue or BRAKE to cancel.\n\n" - ), downloadsize), M_ConfirmConnect, MM_EVENTHANDLER); + CL_ConfirmConnect(); Z_Free(downloadsize); - cl_mode = CL_CONFIRMCONNECT; } #ifdef HAVE_CURL else diff --git a/src/d_netcmd.c b/src/d_netcmd.c index baba42007..a1868ce0a 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -493,6 +493,8 @@ consvar_t cv_showlapemblem = {"showlapemblem", "On", CV_SAVE, CV_OnOff, NULL, 0, consvar_t cv_showviewpointtext = {"showviewpointtext", "On", CV_SAVE, CV_OnOff, 0, 0, NULL, NULL, 0, 0, NULL}; +consvar_t cv_showdownloadprompt = {"showdownloadprompt", "On", CV_SAVE, CV_OnOff, 0, 0, NULL, NULL, 0, 0, NULL}; + // Intermission time Tails 04-19-2002 static CV_PossibleValue_t inttime_cons_t[] = {{0, "MIN"}, {3600, "MAX"}, {0, NULL}}; consvar_t cv_inttime = {"inttime", "20", CV_NETVAR, inttime_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; @@ -994,6 +996,7 @@ void D_RegisterClientCommands(void) CV_RegisterVar(&cv_showtrackaddon); CV_RegisterVar(&cv_showviewpointtext); + CV_RegisterVar(&cv_showdownloadprompt); CV_RegisterVar(&cv_director); CV_RegisterVar(&cv_kartdebugdirector); diff --git a/src/d_netcmd.h b/src/d_netcmd.h index f4ca00214..01fb98243 100644 --- a/src/d_netcmd.h +++ b/src/d_netcmd.h @@ -166,6 +166,7 @@ extern consvar_t cv_minihead; extern consvar_t cv_showlapemblem; extern consvar_t cv_showviewpointtext; +extern consvar_t cv_showdownloadprompt; extern consvar_t cv_luaimmersion; extern consvar_t cv_fakelocalskin; extern consvar_t cv_showlocalskinmenus;