]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_demo.c
protocol/dp8: Implement parting messages
[xonotic/darkplaces.git] / cl_demo.c
index eb4ab55e933592bbace8c10a2220e6970c9bd93d..4c826c0db6fffa0494df5d3c73126ba9ea90f47c 100644 (file)
--- a/cl_demo.c
+++ b/cl_demo.c
@@ -256,9 +256,8 @@ void CL_ReadDemoMessage(void)
                }
                if (cl_message.cursize > cl_message.maxsize)
                {
-                       Con_Printf("Demo message (%i) > cl_message.maxsize (%i)", cl_message.cursize, cl_message.maxsize);
+                       CL_Disconnect(false, "Demo message (%i) > cl_message.maxsize (%i)", cl_message.cursize, cl_message.maxsize);
                        cl_message.cursize = 0;
-                       CL_Disconnect();
                        return;
                }
                VectorCopy(cl.mviewangles[0], cl.mviewangles[1]);
@@ -285,7 +284,7 @@ void CL_ReadDemoMessage(void)
                }
                else
                {
-                       CL_Disconnect();
+                       CL_Disconnect(false, NULL);
                        return;
                }
        }
@@ -364,7 +363,7 @@ void CL_Record_f(cmd_state_t *cmd)
        }
 
        if (cls.state == ca_connected)
-               CL_Disconnect();
+               CL_Disconnect(false, NULL);
 
        // write the forced cd track number, or -1
        if (c == 4)
@@ -422,7 +421,7 @@ void CL_PlayDemo(const char *demo)
        cls.demostarting = true;
 
        // disconnect from server
-       CL_Disconnect();
+       CL_Disconnect(false, NULL);
 
        // update networking ports (this is mainly just needed at startup)
        NetConn_UpdateSockets();
@@ -680,7 +679,7 @@ static void CL_Demos_f(cmd_state_t *cmd)
                return;
        if (cls.demonum == -1)
                cls.demonum = 1;
-       CL_Disconnect();
+       CL_Disconnect(false, NULL);
        CL_NextDemo();
 }
 
@@ -695,7 +694,7 @@ static void CL_Stopdemo_f(cmd_state_t *cmd)
 {
        if (!cls.demoplayback)
                return;
-       CL_Disconnect();
+       CL_Disconnect(false, NULL);
 }
 
 // LadyHavoc: pausedemo command