Be a bit more verbose about errors.

This commit is contained in:
Shpoike 2023-08-11 15:03:25 +01:00
parent dbb9aa329a
commit e907f6adf0
3 changed files with 11 additions and 3 deletions

View File

@ -1630,7 +1630,7 @@ CL_Connect_f
================
*/
void CL_Connect_c(int argn, const char *partial, struct xcommandargcompletioncb_s *ctx);
void CL_Connect_f (void)
static void CL_Connect_f (void)
{
char *server;

View File

@ -399,6 +399,15 @@ void M_ToggleMenu_f (void)
#endif
#ifndef NOBUILTINMENUS
{
extern cvar_t cl_disconnectreason;
if (*cl_disconnectreason.string)
{
Menu_Prompt(NULL, NULL, cl_disconnectreason.string, NULL, NULL, "Okay", true);
Cvar_Set(&cl_disconnectreason, "");
}
}
M_Menu_Main_f ();
Key_Dest_Remove(kdm_console|kdm_cwindows);
#endif

View File

@ -381,11 +381,10 @@ void VARGS SV_Error (char *error, ...)
if (!isDedicated) //dedicated servers crash...
{
extern cvar_t cl_disconnectreason;
extern jmp_buf host_abort;
SCR_EndLoadingPlaque();
SV_UnspawnServer();
Cvar_Set(&cl_disconnectreason, va("SV_Error: %s", string));
CL_Disconnect(string);
inerror=false;
longjmp (host_abort, 1);
}