Updated hook.lua - move autorefresh check

Updated hook.lua - move autorefresh check to save some nanoseconds of CPU and some bytes of RAM.
This commit is contained in:
uRandomAlex 2016-07-16 15:16:56 +10:00 committed by GitHub
parent 75f70ca1ce
commit ea9b292d83

View File

@ -1,3 +1,4 @@
if hook.GetULibTable then return end -- Prevent autorefresh reloading this file
local gmod = gmod
local pairs = pairs
@ -21,8 +22,6 @@ HOOK_NORMAL = 0
HOOK_LOW = 1
HOOK_MONITOR_LOW = 2
if hook.GetULibTable then return end -- Prevent autorefresh reloading this file
-- Grab all previous hooks from the pre-existing hook module.
local OldHooks = hook.GetTable()