Example #1
0
/*
====================
CL_TimeDemo_f

timedemo [demoname]
====================
*/
void CL_TimeDemo_f (void)
{
	if (Cmd_Argc() != 2)
	{
		Con_Print("timedemo <demoname> : gets demo speeds\n");
		return;
	}

	srand(0); // predictable random sequence for benchmarking

	CL_PlayDemo_f ();

// cls.td_starttime will be grabbed at the second frame of the demo, so
// all the loading time doesn't get counted

	// instantly hide console and deactivate it
	key_dest = key_game;
	key_consoleactive = 0;
	scr_con_current = 0;

	cls.timedemo = true;
	cls.td_frames = -2;		// skip the first frame
	cls.demonum = -1;		// stop demo loop
	cls.demonum = -1;		// stop demo loop
}
Example #2
0
/*
====================
CL_TimeDemo_f

timedemo [demoname]
====================
*/
void CL_TimeDemo_f (void)
{
	if (cmd_source != src_command)
		return;

	if (Cmd_Argc() != 2)
	{
		Con_Printf ("timedemo <demoname> : gets demo speeds\n");
		return;
	}

	CL_PlayDemo_f ();
	
// cls.td_starttime will be grabbed at the second frame of the demo, so
// all the loading time doesn't get counted
	
	cls.timedemo = true;
	cls.td_startframe = host_framecount;
	cls.td_lastframe = -1;		// get a new message this frame
}
Example #3
0
/**
 * timedemo [demoname]
 */
void CL_TimeDemo_f(void) {
	if (CmdArgs::getSource() != CmdArgs::COMMAND)
		return;

	if (CmdArgs::getArgCount() != 2) {
		Con_Printf("timedemo <demoname> : gets demo speeds\n");
		return;
	}

	if (key_dest == key_console) {
		//make console disappare fast
		saveconspeed = scr_conspeed.getFloat();
		scr_conspeed.set(1000000.0f);
		Con_ToggleConsole_f();
	}

	CL_PlayDemo_f();

	// cls.td_starttime will be grabbed at the second frame of the demo, so
	// all the loading time doesn't get counted
	cls.timedemo = true;
	cls.td_startframe = host_framecount;
	cls.td_lastframe = -1; // get a new message this frame
}
Example #4
0
void Movie_CaptureDemo_f (void)  //qb: with additional enhancement from FQ Mark V
{
    if (Cmd_Argc() != 2)
    {
        Con_Printf ("Usage: capturedemo <demoname>\nstopdemo or capture_stop will end video capture\n");
        return;
    }

    if (movie_is_capturing)
    {
        Con_Printf ("Can't capture demo, video is capturing\n");
        return;
    }

    Con_Printf ("Capturing %s.dem\n", Cmd_Argv(1));
    if (key_dest != key_game)
        key_dest = key_game;

    CL_Clear_Demos_Queue ();

    CL_PlayDemo_f ();
    if (!cls.demoplayback)
    {
        Con_Printf("Movie_CaptureDemo_f: demoplayback = false.\n");
        return;
    }
    Movie_Start_f ();
    cls.capturedemo = true;

    if (!movie_is_capturing)
    {
        Movie_StopPlayback ();
        Con_Printf("Movie_CaptureDemo_f: movie_is_capturing = false.\n");
    }
    //qb: why is this here? Host_Stopdemo_f ();
}