summaryrefslogtreecommitdiff
path: root/src/cl_main.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2011-04-25 12:18:33 +0400
committerAndrey Nazarov <skuller@skuller.net>2011-04-26 16:00:37 +0400
commitc8a0069ea58669e7adc828d1c2fc1a179f21e247 (patch)
tree3852c7f461b48aefc45baecda0b47d17f0100075 /src/cl_main.c
parent396285b78b11f7bd2e6f6cf0535c386053d84f43 (diff)
Add client demo seeking support.
Add ‘cl_demosnaps’ cvar. Add ‘seek’ command. Move demo clenup code into cl_demo.c. Client demo recorder now always starts at frame 1.
Diffstat (limited to 'src/cl_main.c')
-rw-r--r--src/cl_main.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/src/cl_main.c b/src/cl_main.c
index 7a334b8..ca01da7 100644
--- a/src/cl_main.c
+++ b/src/cl_main.c
@@ -661,26 +661,9 @@ void CL_Disconnect( error_type_t type ) {
cls.netchan = NULL;
}
- // stop demo
- if( cls.demo.recording ) {
- CL_Stop_f();
- }
-
- if( cls.demo.playback ) {
- FS_FCloseFile( cls.demo.playback );
-
- if( com_timedemo->integer ) {
- unsigned msec = Sys_Milliseconds();
- float sec = ( msec - cls.demo.time_start ) * 0.001f;
- float fps = cls.demo.time_frames / sec;
+ // stop playback and/or recording
+ CL_CleanupDemos();
- Com_Printf( "%u frames, %3.1f seconds: %3.1f fps\n",
- cls.demo.time_frames, sec, fps );
- }
- }
-
- memset( &cls.demo, 0, sizeof( cls.demo ) );
-
// stop download
CL_CleanupDownloads();