]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
inlined Host_EndGame in CL_ParseServerMessage's svc_disconnect case and greatly reduc...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 5 Apr 2004 06:49:31 +0000 (06:49 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 5 Apr 2004 06:49:31 +0000 (06:49 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4083 d7cf8633-e32d-0410-b094-e92efae38249

cl_parse.c
host.c
quakedef.h

index 1db4e0a6b4d35c718064946eecb1aef539432c7d..b050e5333933dcf86fc1c9ef5f4fb7d5a8118edb 100644 (file)
@@ -1551,7 +1551,12 @@ void CL_ParseServerMessage(void)
                        break;
 
                case svc_disconnect:
-                       Host_EndGame ("Server disconnected\n");
+                       Con_Printf ("Server disconnected\n");
+                       if (cls.demonum != -1)
+                               CL_NextDemo ();
+                       else
+                               CL_Disconnect ();
+                       break;
 
                case svc_print:
                        Con_Print(MSG_ReadString());
diff --git a/host.c b/host.c
index 4aea3260bc5a80423a1fbadcf67aadcd4c0f3f84..a432abdb20c966caa2eb2abd0f89188f09606e79 100644 (file)
--- a/host.c
+++ b/host.c
@@ -96,34 +96,6 @@ cvar_t temp1 = {0, "temp1","0"};
 cvar_t timestamps = {CVAR_SAVE, "timestamps", "0"};
 cvar_t timeformat = {CVAR_SAVE, "timeformat", "[%b %e %X] "};
 
-/*
-================
-Host_EndGame
-================
-*/
-void Host_EndGame (const char *format, ...)
-{
-       va_list argptr;
-       char string[1024];
-
-       va_start (argptr,format);
-       vsprintf (string,format,argptr);
-       va_end (argptr);
-       Con_DPrintf("Host_EndGame: %s\n",string);
-
-       Host_ShutdownServer (false);
-
-       if (cls.state == ca_dedicated)
-               Sys_Error ("Host_EndGame: %s\n",string);        // dedicated servers exit
-
-       if (cls.demonum != -1)
-               CL_NextDemo ();
-       else
-               CL_Disconnect ();
-
-       longjmp (host_abortserver, 1);
-}
-
 /*
 ================
 Host_Error
@@ -502,11 +474,11 @@ void Host_ShutdownServer(qboolean crash)
        sizebuf_t buf;
        char message[4];
 
+       Con_DPrintf("Host_ShutdownServer\n");
+
        if (!sv.active)
                return;
 
-       Con_DPrintf("Host_ShutdownServer\n");
-
        // print out where the crash happened, if it was caused by QC
        PR_Crash();
 
index 107a9917c3c0e14b7b9f225ddcdd1c3b24fd1489..bb5e7843939404ab667166c7bd00b150e7a02645 100644 (file)
@@ -240,7 +240,6 @@ void Host_InitCommands(void);
 void Host_Init(void);
 void Host_Shutdown(void);
 void Host_Error(const char *error, ...);
-void Host_EndGame(const char *message, ...);
 void Host_Frame(float time);
 void Host_Quit_f(void);
 void Host_ClientCommands(const char *fmt, ...);