diff --git a/codemp/cgame/cg_view.c b/codemp/cgame/cg_view.c index 8e497df60f..cd36413186 100644 --- a/codemp/cgame/cg_view.c +++ b/codemp/cgame/cg_view.c @@ -3126,8 +3126,17 @@ void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView, qboolean demo } } - // actually issue the rendering calls - CG_DrawActive( stereoView ); + if (pano.integer) { // let's grab a panorama! + cg.levelShot = qtrue; //hide the 2d + VectorClear(cg.refdef.viewangles); + cg.refdef.viewangles[YAW] = -360 * pano.integer / cg_panoNumShots.integer; //choose angle + AnglesToAxis(cg.refdef.viewangles, cg.refdef.viewaxis); + CG_DrawActive(stereoView); + cg.levelShot = qfalse; + } else { + // actually issue the rendering calls + CG_DrawActive(stereoView); + } CG_DrawAutoMap(); diff --git a/codemp/cgame/cg_xcvar.h b/codemp/cgame/cg_xcvar.h index 16579533f4..40d9d97937 100644 --- a/codemp/cgame/cg_xcvar.h +++ b/codemp/cgame/cg_xcvar.h @@ -438,6 +438,9 @@ XCVAR_DEF(cg_pitchHudAngle, "", NULL, CVAR_ARCHIVE ) XCVAR_DEF(cg_pitchHudThickness, "2", NULL, CVAR_ARCHIVE ) XCVAR_DEF(cg_pitchHudX, "320", NULL, CVAR_ARCHIVE ) XCVAR_DEF(cg_pitchHudWidth, "10", NULL, CVAR_ARCHIVE ) -XCVAR_DEF(cg_pitchHudRgba, "204 204 204 204", CG_PitchHUDColorChange, CVAR_ARCHIVE ) +XCVAR_DEF(cg_pitchHudRgba, "204 204 204 204", CG_PitchHUDColorChange, CVAR_ARCHIVE ) + +XCVAR_DEF(pano, "0", NULL, 0) +XCVAR_DEF(cg_panoNumShots, "10", NULL, 0) #undef XCVAR_DEF diff --git a/codemp/client/cl_main.cpp b/codemp/client/cl_main.cpp index 4a982ddddd..17ba02efce 100644 --- a/codemp/client/cl_main.cpp +++ b/codemp/client/cl_main.cpp @@ -48,6 +48,8 @@ cvar_t *cl_debugMove; cvar_t *cl_noprint; cvar_t *cl_motd; cvar_t *cl_motdServer[MAX_MASTER_SERVERS]; +cvar_t *cl_pano; +cvar_t *cl_panoNumShots; cvar_t *rcon_client_password; cvar_t *rconAddress; @@ -2542,6 +2544,21 @@ void CL_Frame ( int msec ) { // decide on the serverTime to render CL_SetCGameTime(); + if (cl_pano->integer && cls.state == CA_ACTIVE) { //grab some panoramic shots + int i = 1; + int pref = cl_pano->integer; + int oldnoprint = cl_noprint->integer; + Con_Close(); + cl_noprint->integer = 1; //hide the screen shot msgs + for (; i <= cl_panoNumShots->integer; i++) { + Cvar_SetValue("pano", i); + SCR_UpdateScreen();// update the screen + Cbuf_ExecuteText(EXEC_NOW, va("screenshot %dpano%02d\n", pref, i)); //grab this screen + } + Cvar_SetValue("pano", 0); //done + cl_noprint->integer = oldnoprint; + } + if (render) { // update the screen SCR_UpdateScreen(); @@ -3310,6 +3327,9 @@ void CL_Init( void ) { for ( int index = 2; index < MAX_MASTER_SERVERS; index++ ) cl_motdServer[index] = Cvar_Get( va( "cl_motdServer%d", index + 1 ), "", CVAR_ARCHIVE_ND ); + cl_pano = Cvar_Get("pano", "0", 0); + cl_panoNumShots = Cvar_Get("cl_panoNumShots", "10", CVAR_ARCHIVE); + cl_timeout = Cvar_Get ("cl_timeout", "200", 0); cl_timeNudge = Cvar_Get ("cl_timeNudge", "0", CVAR_TEMP );