Merge branch 'fix-perfstats-4' into 'master'

Fix perfstats 4 not working properly

See merge request KartKrew/Kart!932
This commit is contained in:
James R 2023-02-19 06:19:29 +00:00
commit e1078e4cb4
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;
}