Client: Put renderscene() into its own function to make profiling easier.

This commit is contained in:
Marco Cawthorne 2020-07-22 23:03:10 +02:00
parent abe97ebe43
commit 4427529e51

View file

@ -115,6 +115,14 @@ CSQC_RendererRestarted(string rstr)
FX_Init();
}
/* this is so that profile_csqc reports more accurate statistics as to
what causes computation time */
void
CSQC_RenderScene(void)
{
renderscene();
}
void
CSQC_UpdateView(float w, float h, float focus)
{
@ -299,10 +307,10 @@ CSQC_UpdateView(float w, float h, float focus)
setproperty(VF_AFOV, autocvar_r_viewmodelfov);
setproperty(VF_ORIGIN, pSeat->m_vecPredictedOrigin + pl.view_ofs);
View_DrawViewModel();
renderscene();
CSQC_RenderScene();
} else {
View_DrawViewModel();
renderscene();
CSQC_RenderScene();
}
for (entity b = world; (b = findfloat(b, ::isCSQC, 1));) {