[Hooks] Removed unused variable.
This commit is contained in:
parent
630893203f
commit
fd5a3d3afc
1 changed files with 2 additions and 2 deletions
|
@ -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))
|
mod:error("(%s): trying to hook %s (a %s), not a function.", func_name, method, type(orig))
|
||||||
return
|
return
|
||||||
end
|
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
|
if _registry.uids[orig] then
|
||||||
orig = _registry.uids[orig]
|
orig = _registry.uids[orig]
|
||||||
end
|
end
|
||||||
|
@ -328,8 +330,6 @@ local function generic_hook_toggle(mod, obj, method, enabled_state)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local orig = get_orig_function(obj, method)
|
|
||||||
|
|
||||||
if _registry[mod][obj[method]] then
|
if _registry[mod][obj[method]] then
|
||||||
_registry[mod][obj[method]].active = enabled_state
|
_registry[mod][obj[method]].active = enabled_state
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue