CL_AbortConnection

This commit is contained in:
Alug committed 2025-05-21 12:12:15 +02:00
1 parent 48ce6bb9e8
commit 38e972deda
3 files changed
+13 -14

No files matched your search

+8 -9
View File
@@ -2307,7 +2307,7 @@ static void M_ConfirmConnect(event_t *ev)
#endif
}
static void AbortConnection(void)
void CL_AbortConnection(void)
{
#ifdef HAVE_CURL
CURLAbortFile();
@@ -2320,7 +2320,6 @@ static void AbortConnection(void)
cl_mode = CL_ABORTED;
}
static boolean CL_FinishedFileList(void)
{
INT32 i;
@@ -2333,7 +2332,7 @@ static boolean CL_FinishedFileList(void)
}
else if (i == 3) // too many files
{
AbortConnection();
CL_AbortConnection();
M_StartMessage(M_GetText(
"You have too many WAD files loaded\n"
"to add ones the server is using.\n"
@@ -2344,7 +2343,7 @@ static boolean CL_FinishedFileList(void)
}
else if (i == 2) // cannot join for some reason
{
AbortConnection();
CL_AbortConnection();
M_StartMessage(M_GetText(
"You have the wrong addons loaded.\n\n"
"To play on this server, restart\n"
@@ -2381,7 +2380,7 @@ static boolean CL_FinishedFileList(void)
{
if (!CL_CheckDownloadable()) // nope!
{
AbortConnection();
CL_AbortConnection();
M_StartMessage(M_GetText(
"An error occured when trying to\n"
"download missing addons.\n"
@@ -2646,7 +2645,7 @@ static boolean CL_ServerConnectionTicker(const char *tmpsave, tic_t *oldtic, tic
{
CONS_Printf(M_GetText("Legacy downloader request packet failed.\n"));
CONS_Printf(M_GetText("Network game synchronization aborted.\n"));
AbortConnection();
CL_AbortConnection();
M_StartMessage(M_GetText(
"The direct download encountered an error.\n"
"See the logfile for more info.\n"
@@ -2673,7 +2672,7 @@ static boolean CL_ServerConnectionTicker(const char *tmpsave, tic_t *oldtic, tic
{
CONS_Printf("%d minute wait time exceeded.\n", cv_connectawaittime.value);
CONS_Printf(M_GetText("Network game synchronization aborted.\n"));
AbortConnection();
CL_AbortConnection();
M_StartMessage(va(
"%d minute wait time exceeded.\n"
"You may retry connection.\n"
@@ -2744,7 +2743,7 @@ static boolean CL_ServerConnectionTicker(const char *tmpsave, tic_t *oldtic, tic
if (!modeattacking && (key == KEY_ESCAPE || key == KEY_JOY1+1 || cl_mode == CL_ABORTED))
{
CONS_Printf(M_GetText("Network game synchronization aborted.\n"));
AbortConnection();
CL_AbortConnection();
return false;
}
@@ -3972,7 +3971,7 @@ static void Got_KickCmd(UINT8 **p, INT32 playernum)
#ifdef DUMPCONSISTENCY
if (msg == KICK_MSG_CON_FAIL) SV_SavedGame();
#endif
AbortConnection();
CL_AbortConnection();
if (msg == KICK_MSG_CON_FAIL)
M_StartMessage(M_GetText("Server closed connection\n(Synch failure)\nPress ESC\n"), NULL, MM_NOTHING);
+3
View File
@@ -634,6 +634,9 @@ void CL_RemovePlayer(INT32 playernum, INT32 reason);
void CL_QueryServerList(msg_server_t *list);
void CL_UpdateServerList(void);
void CL_TimeoutServerList(void);
void CL_AbortConnection(void);
// Is there a game running
boolean Playing(void);
+2 -5
View File
@@ -1315,11 +1315,8 @@ void CURLPrepareFile(const char* url, int dfilenum)
if (!curl_curfile->file)
{
CONS_Alert(CONS_ERROR, "Download of %s failed! Check if you have write access to your download folder!\n", curl_curfile->filename);
CURLAbortFile();
D_QuitNetGame();
CL_Reset();
D_StartTitle();
CONS_Alert(CONS_ERROR, "Couldnt open %s for writing!\nAborting file download.\nCheck if you have write access to your download folder!\n", curl_curfile->filename);
CL_AbortConnection();
M_StartMessage(M_GetText(
"An error occured when trying to\n"
"download missing addons.\n"