Fix perfstats 4 not working properly

This commit is contained in:
SteelT 2023-02-16 23:48:37 -05:00
parent 5b561815d7
commit 047b84e3d0
2 changed files with 3 additions and 3 deletions

View file

@ -679,7 +679,7 @@ void LUA_HookThinkFrame(void)
{
get_hook(&hook, map->ids, k);
if (cv_perfstats.value == 3)
if (cv_perfstats.value == PS_THINKFRAME)
{
lua_pushvalue(gL, -1);/* need the function again */
time_taken = I_GetPreciseTime();
@ -687,7 +687,7 @@ void LUA_HookThinkFrame(void)
call_single_hook(&hook);
if (cv_perfstats.value == 3)
if (cv_perfstats.value == PS_THINKFRAME)
{
lua_Debug ar;
time_taken = I_GetPreciseTime() - time_taken;

View file

@ -683,7 +683,7 @@ void P_Ticker(boolean run)
}
ps_lua_thinkframe_time = I_GetPreciseTime();
LUA_HOOK(ThinkFrame);
LUA_HookThinkFrame();
ps_lua_thinkframe_time = I_GetPreciseTime() - ps_lua_thinkframe_time;
}