Don't draw most of thinker stats when level is not running.

This crashes, why did it ever do this.
This commit is contained in:
NepDisk 2025-09-13 14:56:21 -04:00
parent dd1790749e
commit 30fbf1c4c8

View file

@ -431,6 +431,8 @@ static void M_DrawTickStats(void)
perfstatcol_t detailed_thinkercount_col2 = {94, 119, V_BLUEMAP, detailed_thinkercount_row2};
perfstatcol_t misc_calls_col = {170, 216, V_PURPLEMAP, misc_calls_row};
if (G_GamestateUsesLevel())
{
for (i = 0; i < NUM_THINKERLISTS; i++)
{
for (thinker = thlist[i].next; thinker != &thlist[i]; thinker = thinker->next)
@ -462,9 +464,12 @@ static void M_DrawTickStats(void)
precipcount++;
}
}
}
draw_row = 10;
M_DrawPerfTiming(&tictime_col);
if (G_GamestateUsesLevel())
{
M_DrawPerfTiming(&thinker_time_col);
M_DrawPerfTiming(&detailed_thinker_time_col);
if (server)
@ -481,6 +486,7 @@ static void M_DrawTickStats(void)
M_DrawPerfCount(&detailed_thinkercount_col2);
if (M_HighResolution())
{
V_DrawSmallString(212, 10, V_MONOSPACE | V_ALLOWLOWERCASE | V_PURPLEMAP, "Calls:");
@ -493,6 +499,7 @@ static void M_DrawTickStats(void)
}
M_DrawPerfCount(&misc_calls_col);
}
}
void M_DrawPerfStats(void)