mirror of
https://github.com/HaodongMo/ARC-9.git
synced 2025-03-04 03:02:58 -05:00
Merge pull request #270 from MelowFX/main
fix(hooks): correct logic causing incorrect behavior in return value
This commit is contained in:
commit
027b4296ec
@ -192,7 +192,10 @@ do
|
||||
any = true
|
||||
end
|
||||
|
||||
data = hook.Run("ARC9_" .. val, self, data) or data
|
||||
data2 = hook.Run("ARC9_" .. val, self, data)
|
||||
if data2 ~= nil then
|
||||
data = data2
|
||||
end
|
||||
|
||||
return data, any
|
||||
end
|
||||
@ -229,7 +232,10 @@ do
|
||||
end
|
||||
|
||||
self.HookCache[val] = newCache
|
||||
data = hook.Run("ARC9_" .. val, self, data) or data
|
||||
data2 = hook.Run("ARC9_" .. val, self, data)
|
||||
if data2 ~= nil then
|
||||
data = data2
|
||||
end
|
||||
|
||||
return data, any
|
||||
end
|
||||
|
@ -602,6 +602,8 @@ function SWEP:CanDetach(addr)
|
||||
|
||||
if slottbl and slottbl.Integral then return false end
|
||||
|
||||
if self:RunHook("Hook_CanDetachAttachment", {addr = addr, slottbl = slottbl}) == false then return false end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user