MCPcopy Create free account
hub / github.com/JACoders/OpenJK / CG_DrawActiveFrame

Function CG_DrawActiveFrame

code/cgame/cg_view.cpp:1991–2262  ·  view source on GitHub ↗

so we know if we should go back to normal fog

Source from the content-addressed store, hash-verified

1989extern vec3_t serverViewOrg;
1990static qboolean cg_rangedFogging = qfalse; //so we know if we should go back to normal fog
1991void CG_DrawActiveFrame( int serverTime, stereoFrame_t stereoView ) {
1992 qboolean inwater = qfalse;
1993
1994 cg.time = serverTime;
1995
1996 // update cvars
1997 CG_UpdateCvars();
1998
1999 // if we are only updating the screen as a loading
2000 // pacifier, don't even try to read snapshots
2001 if ( cg.infoScreenText[0] != 0 ) {
2002 CG_DrawInformation();
2003 return;
2004 }
2005
2006 CG_ClearHealthBarEnts();
2007
2008 CG_RunLightStyles();
2009
2010 // any looped sounds will be respecified as entities
2011 // are added to the render list
2012 cgi_S_ClearLoopingSounds();
2013
2014 // clear all the render lists
2015 cgi_R_ClearScene();
2016
2017 CG_BuildSolidList();
2018
2019 // set up cg.snap and possibly cg.nextSnap
2020 CG_ProcessSnapshots();
2021 // if we haven't received any snapshots yet, all
2022 // we can draw is the information screen
2023 if ( !cg.snap ) {
2024 //CG_DrawInformation();
2025 return;
2026 }
2027
2028 // make sure the lagometerSample and frame timing isn't done twice when in stereo
2029 if ( stereoView != STEREO_RIGHT ) {
2030 cg.frametime = cg.time - cg.oldTime;
2031 cg.oldTime = cg.time;
2032 }
2033 // Make sure the helper has the updated time
2034 theFxHelper.AdjustTime( cg.frametime );
2035
2036 // let the client system know what our weapon and zoom settings are
2037 //FIXME: should really send forcePowersActive over network onto cg.snap->ps...
2038 const int fpActive = cg_entities[0].gent->client->ps.forcePowersActive;
2039 const bool matrixMode = !!(fpActive & ((1 << FP_SPEED) | (1 << FP_RAGE)));
2040 float speed = cg.refdef.fov_y / 75.0 * (matrixMode ? 1.0f : cg_timescale.value);
2041
2042//FIXME: junk code, BUG:168
2043
2044 static bool wasForceSpeed=false;
2045 bool isForceSpeed=cg_entities[0].gent->client->ps.forcePowersActive&(1<<FP_SPEED)?true:false;
2046 if (isForceSpeed&&!wasForceSpeed)
2047 {
2048 CGCam_Smooth(0.75f,5000);

Callers 1

vmMainFunction · 0.70

Calls 15

CG_ClearHealthBarEntsFunction · 0.85
cgi_R_SetRangeFogFunction · 0.85
CG_DrawMiscEntsFunction · 0.85
VectorCopyFunction · 0.85
VectorClearFunction · 0.85
AnglesToAxisFunction · 0.85
CG_UpdateCvarsFunction · 0.70
CG_DrawInformationFunction · 0.70
CG_RunLightStylesFunction · 0.70
cgi_S_ClearLoopingSoundsFunction · 0.70
cgi_R_ClearSceneFunction · 0.70
CG_BuildSolidListFunction · 0.70

Tested by

no test coverage detected