forked from TeamUlysses/ulib
Conforms more to gmod development version of hook.lua
This commit is contained in:
parent
616b4af919
commit
6878da326f
@ -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
|
||||
--
|
||||
|
Loading…
Reference in New Issue
Block a user