From 047b84e3d0ef27081abed177245142a3c2d47e52 Mon Sep 17 00:00:00 2001 From: SteelT Date: Thu, 16 Feb 2023 23:48:37 -0500 Subject: [PATCH] Fix perfstats 4 not working properly --- src/lua_hooklib.c | 4 ++-- src/p_tick.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lua_hooklib.c b/src/lua_hooklib.c index ce7e271ca..f5ca60255 100644 --- a/src/lua_hooklib.c +++ b/src/lua_hooklib.c @@ -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; diff --git a/src/p_tick.c b/src/p_tick.c index 7973f7972..79f245a22 100644 --- a/src/p_tick.c +++ b/src/p_tick.c @@ -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; }