From: havoc Date: Wed, 25 May 2011 01:46:42 +0000 (+0000) Subject: r_speeds now shows without being connected (in menu for example), X-Git-Tag: xonotic-v0.5.0~153 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ec50d78b853339409b2ec0863b6d02fa5933f6be;p=xonotic%2Fdarkplaces.git r_speeds now shows without being connected (in menu for example), showfps also does git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11166 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=dcfd91cf606568faf86a1826496f9f86927c45af --- diff --git a/cl_screen.c b/cl_screen.c index e3756aeb..613ef990 100644 --- a/cl_screen.c +++ b/cl_screen.c @@ -766,7 +766,7 @@ void R_TimeReport_BeginFrame(void) r_timereport_active = false; memset(&r_refdef.stats, 0, sizeof(r_refdef.stats)); - if (r_speeds.integer >= 2 && cls.signon == SIGNONS && cls.state == ca_connected) + if (r_speeds.integer >= 2) { r_timereport_active = true; r_timereport_start = r_timereport_current = Sys_DoubleTime(); @@ -791,16 +791,16 @@ void R_TimeReport_EndFrame(void) mleaf_t *viewleaf; string[0] = 0; - if (r_speeds.integer && cls.signon == SIGNONS && cls.state == ca_connected) + if (r_speeds.integer) { // put the location name in the r_speeds display as it greatly helps // when creating loc files loc = CL_Locs_FindNearest(cl.movement_origin); viewleaf = (r_refdef.scene.worldmodel && r_refdef.scene.worldmodel->brush.PointInLeaf) ? r_refdef.scene.worldmodel->brush.PointInLeaf(r_refdef.scene.worldmodel, r_refdef.view.origin) : NULL; dpsnprintf(string, sizeof(string), -"%6.0fus rendertime %3.0f%% viewscale %s%s\n" +"%6.0fus rendertime %3.0f%% viewscale %s%s %.3f cl.time\n" "%3i renders org:'%+8.2f %+8.2f %+8.2f' dir:'%+2.3f %+2.3f %+2.3f'\n" -"%5i viewleaf%5i cluster%2i area%4i brushes%4i surfaces(%7i triangles)\n" +"%5i viewleaf%5i cluster%3i area%4i brushes%4i surfaces(%7i triangles)\n" "%7i surfaces%7i triangles %5i entities (%7i surfaces%7i triangles)\n" "%5i leafs%5i portals%6i/%6i particles%6i/%6i decals %3i%% quality\n" "%7i lightmap updates (%7i pixels)%8iKB/%8iKB framedata\n" @@ -810,7 +810,7 @@ void R_TimeReport_EndFrame(void) "%6i draws%8i vertices%8i triangles bloompixels%8i copied%8i drawn\n" "updated%5i indexbuffers%8i bytes%5i vertexbuffers%8i bytes\n" "%s" -, r_refdef.lastdrawscreentime * 1000000.0, r_viewscale.value * sqrt(viewscalefpsadjusted) * 100.0f, loc ? "Location: " : "", loc ? loc->name : "" +, r_refdef.lastdrawscreentime * 1000000.0, r_viewscale.value * sqrt(viewscalefpsadjusted) * 100.0f, loc ? "Location: " : "", loc ? loc->name : "", cl.time , r_refdef.stats.renders, r_refdef.view.origin[0], r_refdef.view.origin[1], r_refdef.view.origin[2], r_refdef.view.forward[0], r_refdef.view.forward[1], r_refdef.view.forward[2] , viewleaf ? (int)(viewleaf - r_refdef.scene.worldmodel->brush.data_leafs) : -1, viewleaf ? viewleaf->clusterindex : -1, viewleaf ? viewleaf->areaindex : -1, viewleaf ? viewleaf->numleafbrushes : 0, viewleaf ? viewleaf->numleafsurfaces : 0, viewleaf ? R_CountLeafTriangles(r_refdef.scene.worldmodel, viewleaf) : 0 , r_refdef.stats.world_surfaces, r_refdef.stats.world_triangles, r_refdef.stats.entities, r_refdef.stats.entities_surfaces, r_refdef.stats.entities_triangles @@ -1791,7 +1791,6 @@ void SCR_DrawScreen (void) SCR_DrawPause (); if (!r_letterbox.value) Sbar_Draw(); - Sbar_ShowFPS(); SHOWLMP_drawall(); SCR_CheckDrawCenterString(); } @@ -1811,11 +1810,9 @@ void SCR_DrawScreen (void) if (r_timereport_active) R_TimeReport("2d"); - if (cls.signon == SIGNONS) - { - R_TimeReport_EndFrame(); - R_TimeReport_BeginFrame(); - } + R_TimeReport_EndFrame(); + R_TimeReport_BeginFrame(); + Sbar_ShowFPS(); DrawQ_Finish();