From 07ac2ed2ae697bfa2c3ad6edcc1776af16c2e826 Mon Sep 17 00:00:00 2001 From: Azumgi Date: Mon, 29 Jan 2018 06:05:26 +0300 Subject: [PATCH] Fixed enabling/disabling hooks bug (hooks) --- vmf_source/scripts/mods/vmf/modules/hooks.lua | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/vmf_source/scripts/mods/vmf/modules/hooks.lua b/vmf_source/scripts/mods/vmf/modules/hooks.lua index 6b5cdad..a74f736 100644 --- a/vmf_source/scripts/mods/vmf/modules/hooks.lua +++ b/vmf_source/scripts/mods/vmf/modules/hooks.lua @@ -92,9 +92,7 @@ local function update_function_hook_chain(hooked_function_name) return hook_entry.hook_function(hooked_function_entry.original_function, ...) end else - hook_entry.exec_function = function(...) - return hooked_function_entry.original_function - end + hook_entry.exec_function = hooked_function_entry.original_function end else if hook_entry.is_enabled then @@ -102,9 +100,7 @@ local function update_function_hook_chain(hooked_function_name) return hook_entry.hook_function(hooked_function_entry.hooks[i - 1].exec_function, ...) end else - hook_entry.exec_function = function(...) - return hooked_function_entry.hooks[i - 1].exec_function - end + hook_entry.exec_function = hooked_function_entry.hooks[i - 1].exec_function end end end