]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_demo.c
Tomaz made the progs/bolt.mdl and progs/bolt2.mdl loading not complain if missing
[xonotic/darkplaces.git] / cl_demo.c
index c6402413e5239946dc832227a7cfc798694d4c8e..ec3f65d4a7840734b50599760410a2f7c6687e75 100644 (file)
--- a/cl_demo.c
+++ b/cl_demo.c
@@ -319,6 +319,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();
@@ -338,6 +339,7 @@ void CL_PlayDemo_f (void)
 
        SCR_BeginLoadingPlaque ();
 
+       strlcpy(cls.demoname, name, sizeof(cls.demoname));
        cls.demoplayback = true;
        cls.state = ca_connected;
        cls.forcetrack = 0;
@@ -374,6 +376,9 @@ 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);
+       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();
 }
 
 /*