Update PS_UpdateTickStats to correctly update metric history for pre and post thinkframe hooks

This commit is contained in:
namishere 2023-02-11 04:19:24 -08:00
parent 039df0d38b
commit eaacb64d3f

View file

@ -646,10 +646,21 @@ void PS_UpdateTickStats(void)
if(cv_perfstats.value >= 3 && PS_IsLevelActive()) if(cv_perfstats.value >= 3 && PS_IsLevelActive())
{ {
int i; int i;
for (i = 0; i < thinkframe_hooks_length; i++) if (cv_perfstats.value == 3)
{ {
for (i = 0; i < thinkframe_hooks_length; i++)
PS_UpdateMetricHistory(&thinkframe_hooks[i].time_taken, true, false, false); PS_UpdateMetricHistory(&thinkframe_hooks[i].time_taken, true, false, false);
} }
else if (cv_perfstats.value == 4)
{
for (i = 0; i < prethinkframe_hooks_length; i++)
PS_UpdateMetricHistory(&prethinkframe_hooks[i].time_taken, true, false, false);
}
else if (cv_perfstats.value == 5)
{
for (i = 0; i < postthinkframe_hooks_length; i++)
PS_UpdateMetricHistory(&postthinkframe_hooks[i].time_taken, true, false, false);
}
} }
if (cv_perfstats.value) if (cv_perfstats.value)
{ {