mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-28 13:21:10 +00:00
Merge branch 'various-compiling-fixes' into 'next'
Various compiling fixes See merge request KartKrew/Kart-Public!212
This commit is contained in:
commit
34b6998b2e
4 changed files with 17 additions and 4 deletions
|
@ -398,7 +398,7 @@ endif()
|
||||||
if(${SRB2_CONFIG_HAVE_CURL})
|
if(${SRB2_CONFIG_HAVE_CURL})
|
||||||
if(${SRB2_CONFIG_USE_INTERNAL_LIBRARIES})
|
if(${SRB2_CONFIG_USE_INTERNAL_LIBRARIES})
|
||||||
set(CURL_FOUND ON)
|
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)
|
if(${SRB2_SYSTEM_BITS} EQUAL 64)
|
||||||
set(CURL_LIBRARIES "-L${CMAKE_SOURCE_DIR}/libs/curl/lib64 -lcurl")
|
set(CURL_LIBRARIES "-L${CMAKE_SOURCE_DIR}/libs/curl/lib64 -lcurl")
|
||||||
else() # 32-bit
|
else() # 32-bit
|
||||||
|
|
|
@ -2040,6 +2040,7 @@ void CL_UpdateServerList(boolean internetsearch, INT32 room)
|
||||||
|
|
||||||
static void M_ConfirmConnect(event_t *ev)
|
static void M_ConfirmConnect(event_t *ev)
|
||||||
{
|
{
|
||||||
|
#ifndef NONET
|
||||||
if (ev->type == ev_keydown)
|
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])
|
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);
|
M_ClearMenus(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
(void)ev;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static boolean CL_FinishedFileList(void)
|
static boolean CL_FinishedFileList(void)
|
||||||
{
|
{
|
||||||
INT32 i;
|
INT32 i;
|
||||||
char *downloadsize;
|
char *downloadsize = NULL;
|
||||||
//CONS_Printf(M_GetText("Checking files...\n"));
|
//CONS_Printf(M_GetText("Checking files...\n"));
|
||||||
i = CL_CheckFiles();
|
i = CL_CheckFiles();
|
||||||
if (i == 4) // still checking ...
|
if (i == 4) // still checking ...
|
||||||
|
@ -2157,22 +2161,28 @@ static boolean CL_FinishedFileList(void)
|
||||||
if (!curl_failedwebdownload)
|
if (!curl_failedwebdownload)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
#ifndef NONET
|
||||||
downloadcompletednum = 0;
|
downloadcompletednum = 0;
|
||||||
downloadcompletedsize = 0;
|
downloadcompletedsize = 0;
|
||||||
totalfilesrequestednum = 0;
|
totalfilesrequestednum = 0;
|
||||||
totalfilesrequestedsize = 0;
|
totalfilesrequestedsize = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
for (i = 0; i < fileneedednum; i++)
|
for (i = 0; i < fileneedednum; i++)
|
||||||
if (fileneeded[i].status == FS_NOTFOUND || fileneeded[i].status == FS_MD5SUMBAD)
|
if (fileneeded[i].status == FS_NOTFOUND || fileneeded[i].status == FS_MD5SUMBAD)
|
||||||
{
|
{
|
||||||
|
#ifndef NONET
|
||||||
totalfilesrequestednum++;
|
totalfilesrequestednum++;
|
||||||
totalfilesrequestedsize += fileneeded[i].totalsize;
|
totalfilesrequestedsize += fileneeded[i].totalsize;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef NONET
|
||||||
if (totalfilesrequestedsize>>20 >= 100)
|
if (totalfilesrequestedsize>>20 >= 100)
|
||||||
downloadsize = Z_StrDup(va("%uM",totalfilesrequestedsize>>20));
|
downloadsize = Z_StrDup(va("%uM",totalfilesrequestedsize>>20));
|
||||||
else
|
else
|
||||||
downloadsize = Z_StrDup(va("%uK",totalfilesrequestedsize>>10));
|
downloadsize = Z_StrDup(va("%uK",totalfilesrequestedsize>>10));
|
||||||
|
#endif
|
||||||
|
|
||||||
if (serverisfull)
|
if (serverisfull)
|
||||||
M_StartMessage(va(M_GetText(
|
M_StartMessage(va(M_GetText(
|
||||||
|
@ -2276,7 +2286,6 @@ static boolean CL_ServerConnectionSearchTicker(tic_t *asksent)
|
||||||
*asksent = I_GetTime() + NEWTICRATE;
|
*asksent = I_GetTime() + NEWTICRATE;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
(void)viams;
|
|
||||||
(void)asksent;
|
(void)asksent;
|
||||||
// No netgames, so we skip this state.
|
// No netgames, so we skip this state.
|
||||||
cl_mode = CL_ASKJOIN;
|
cl_mode = CL_ASKJOIN;
|
||||||
|
@ -2993,8 +3002,10 @@ void CL_Reset(void)
|
||||||
fileneedednum = 0;
|
fileneedednum = 0;
|
||||||
memset(fileneeded, 0, sizeof(fileneeded));
|
memset(fileneeded, 0, sizeof(fileneeded));
|
||||||
|
|
||||||
|
#ifndef NONET
|
||||||
totalfilesrequestednum = 0;
|
totalfilesrequestednum = 0;
|
||||||
totalfilesrequestedsize = 0;
|
totalfilesrequestedsize = 0;
|
||||||
|
#endif
|
||||||
firstconnectattempttime = 0;
|
firstconnectattempttime = 0;
|
||||||
serverisfull = false;
|
serverisfull = false;
|
||||||
connectiontimeout = (tic_t)cv_nettimeout.value; //reset this temporary hack
|
connectiontimeout = (tic_t)cv_nettimeout.value; //reset this temporary hack
|
||||||
|
|
|
@ -874,8 +874,10 @@ void Got_Filetxpak(void)
|
||||||
file->status = FS_FOUND;
|
file->status = FS_FOUND;
|
||||||
CONS_Printf(M_GetText("Downloading %s...(done)\n"),
|
CONS_Printf(M_GetText("Downloading %s...(done)\n"),
|
||||||
filename);
|
filename);
|
||||||
|
#ifndef NONET
|
||||||
downloadcompletednum++;
|
downloadcompletednum++;
|
||||||
downloadcompletedsize += file->totalsize;
|
downloadcompletedsize += file->totalsize;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -58,7 +58,7 @@ static void MasterServer_OnChange(void);
|
||||||
static CV_PossibleValue_t masterserver_update_rate_cons_t[] = {
|
static CV_PossibleValue_t masterserver_update_rate_cons_t[] = {
|
||||||
{2, "MIN"},
|
{2, "MIN"},
|
||||||
{60, "MAX"},
|
{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};
|
consvar_t cv_masterserver = {"masterserver", "https://mb.srb2.org/MS/0", CV_SAVE|CV_CALL, NULL, MasterServer_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
Loading…
Reference in a new issue