]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_demo.c
fix stupid quake precision problem with PF_vectoangles (it rounded pitch to integer!)
[xonotic/darkplaces.git] / cl_demo.c
index 1024cf3a9e1266f4027cc8e6eb1255d5af4171e6..2b7f060b062bb0fe67b52814721799f29a8da0c8 100644 (file)
--- a/cl_demo.c
+++ b/cl_demo.c
@@ -188,6 +188,10 @@ void CL_ReadDemoMessage(void)
                {
                        MSG_BeginReading();
                        CL_ParseServerMessage();
+
+                       // In case the demo contains a "svc_disconnect" message
+                       if (!cls.demoplayback)
+                               return;
                }
                else
                {
@@ -319,6 +323,7 @@ void CL_PlayDemo_f (void)
 
        // disconnect from server
        CL_Disconnect ();
+       Host_ShutdownServer (false);
 
        // update networking ports (this is mainly just needed at startup)
        NetConn_ClientFrame();
@@ -375,7 +380,7 @@ void CL_FinishTimeDemo (void)
        fpsmax = cls.td_minframetime > 0 ? 1.0 / cls.td_minframetime : 0;
        // LordHavoc: timedemo now prints out 7 digits of fraction, and min/avg/max
        Con_Printf("%i frames %5.7f seconds %5.7f fps\nmin/avg/max: %5.7f/%5.7f/%5.7f\n", frames, time, fpsavg, fpsmin, fpsavg, fpsmax);
-       Con_LogPrintf("benchmark.log", "date %s | enginedate %s | demo %s | commandline %s | result %i frames %5.7f seconds %5.7f fps min/avg/max: %5.7f/%5.7f/%5.7f\n", Sys_TimeString("%Y-%m-%d %H:%M:%S"), buildstring, cls.demoname, cmdline.string, frames, time, fpsavg, fpsmin, fpsavg, fpsmax);
+       Log_Printf("benchmark.log", "date %s | enginedate %s | demo %s | commandline %s | result %i frames %5.7f seconds %5.7f fps min/avg/max: %5.7f/%5.7f/%5.7f\n", Sys_TimeString("%Y-%m-%d %H:%M:%S"), buildstring, cls.demoname, cmdline.string, frames, time, fpsavg, fpsmin, fpsavg, fpsmax);
        if (COM_CheckParm("-benchmark"))
                Host_Quit_f();
 }