From fd5a3d3afc54c9333d9f264e37f5d51de7a3e2cf Mon Sep 17 00:00:00 2001 From: FireSiku Date: Wed, 16 Jan 2019 19:24:07 -0500 Subject: [PATCH] [Hooks] Removed unused variable. --- vmf/scripts/mods/vmf/modules/core/hooks.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vmf/scripts/mods/vmf/modules/core/hooks.lua b/vmf/scripts/mods/vmf/modules/core/hooks.lua index 989c880..801a5de 100644 --- a/vmf/scripts/mods/vmf/modules/core/hooks.lua +++ b/vmf/scripts/mods/vmf/modules/core/hooks.lua @@ -289,6 +289,8 @@ local function generic_hook(mod, obj, method, handler, func_name) mod:error("(%s): trying to hook %s (a %s), not a function.", func_name, method, type(orig)) return end + + -- Edge Case: If someone hooks a copy of a function after its been hooked, point it back in the right direction if _registry.uids[orig] then orig = _registry.uids[orig] end @@ -328,8 +330,6 @@ local function generic_hook_toggle(mod, obj, method, enabled_state) end end - local orig = get_orig_function(obj, method) - if _registry[mod][obj[method]] then _registry[mod][obj[method]].active = enabled_state else