diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9dd7f500a..18c3a34f7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -398,7 +398,7 @@ endif() if(${SRB2_CONFIG_HAVE_CURL}) if(${SRB2_CONFIG_USE_INTERNAL_LIBRARIES}) set(CURL_FOUND ON) - set(CURL_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/libs/curl) + set(CURL_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/libs/curl/include) if(${SRB2_SYSTEM_BITS} EQUAL 64) set(CURL_LIBRARIES "-L${CMAKE_SOURCE_DIR}/libs/curl/lib64 -lcurl") else() # 32-bit diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 829c37d29..7640b79c7 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -2040,6 +2040,7 @@ void CL_UpdateServerList(boolean internetsearch, INT32 room) static void M_ConfirmConnect(event_t *ev) { +#ifndef NONET if (ev->type == ev_keydown) { if (ev->data1 == ' ' || ev->data1 == 'y' || ev->data1 == KEY_ENTER || ev->data1 == gamecontrol[gc_accelerate][0] || ev->data1 == gamecontrol[gc_accelerate][1]) @@ -2071,12 +2072,15 @@ static void M_ConfirmConnect(event_t *ev) M_ClearMenus(true); } } +#else + (void)ev; +#endif } static boolean CL_FinishedFileList(void) { INT32 i; - char *downloadsize; + char *downloadsize = NULL; //CONS_Printf(M_GetText("Checking files...\n")); i = CL_CheckFiles(); if (i == 4) // still checking ... @@ -2157,22 +2161,28 @@ static boolean CL_FinishedFileList(void) if (!curl_failedwebdownload) #endif { +#ifndef NONET downloadcompletednum = 0; downloadcompletedsize = 0; totalfilesrequestednum = 0; totalfilesrequestedsize = 0; +#endif for (i = 0; i < fileneedednum; i++) if (fileneeded[i].status == FS_NOTFOUND || fileneeded[i].status == FS_MD5SUMBAD) { +#ifndef NONET totalfilesrequestednum++; totalfilesrequestedsize += fileneeded[i].totalsize; +#endif } +#ifndef NONET if (totalfilesrequestedsize>>20 >= 100) downloadsize = Z_StrDup(va("%uM",totalfilesrequestedsize>>20)); else downloadsize = Z_StrDup(va("%uK",totalfilesrequestedsize>>10)); +#endif if (serverisfull) M_StartMessage(va(M_GetText( @@ -2276,7 +2286,6 @@ static boolean CL_ServerConnectionSearchTicker(tic_t *asksent) *asksent = I_GetTime() + NEWTICRATE; } #else - (void)viams; (void)asksent; // No netgames, so we skip this state. cl_mode = CL_ASKJOIN; @@ -2993,8 +3002,10 @@ void CL_Reset(void) fileneedednum = 0; memset(fileneeded, 0, sizeof(fileneeded)); +#ifndef NONET totalfilesrequestednum = 0; totalfilesrequestedsize = 0; +#endif firstconnectattempttime = 0; serverisfull = false; connectiontimeout = (tic_t)cv_nettimeout.value; //reset this temporary hack diff --git a/src/d_netfil.c b/src/d_netfil.c index 621ce2953..c9bfb4ea7 100644 --- a/src/d_netfil.c +++ b/src/d_netfil.c @@ -874,8 +874,10 @@ void Got_Filetxpak(void) file->status = FS_FOUND; CONS_Printf(M_GetText("Downloading %s...(done)\n"), filename); +#ifndef NONET downloadcompletednum++; downloadcompletedsize += file->totalsize; +#endif } } else diff --git a/src/mserv.c b/src/mserv.c index 4c044fed2..e05067194 100644 --- a/src/mserv.c +++ b/src/mserv.c @@ -58,7 +58,7 @@ static void MasterServer_OnChange(void); static CV_PossibleValue_t masterserver_update_rate_cons_t[] = { {2, "MIN"}, {60, "MAX"}, - {0} + {0, NULL} }; consvar_t cv_masterserver = {"masterserver", "https://mb.srb2.org/MS/0", CV_SAVE|CV_CALL, NULL, MasterServer_OnChange, 0, NULL, NULL, 0, 0, NULL};