Conforms more to gmod development version of hook.lua

This commit is contained in:
Nayruden 2015-02-10 19:32:23 -07:00
parent 616b4af919
commit 6878da326f

View File

@ -25,7 +25,7 @@ NORMAL = 0
LOW = 1
MONITOR_LOW = 2
Hooks = {}
local Hooks = {}
local BackwardsHooks = {} -- A table fully to garry's spec for aVoN
--
@ -75,7 +75,7 @@ end
-- Run a hook (this replaces Call)
--
function Run( name, ... )
return Call( name, nil, ... )
return Call( name, gmod and gmod.GetGamemode() or nil, ... )
end
--
@ -83,15 +83,6 @@ end
--
function Call( name, gm, ... )
local ret
--
-- If called from hook.Run then gm will be nil.
--
if ( gm == nil && gmod != nil ) then
gm = gmod.GetGamemode()
end
--
-- Run hooks
--