mirror of
https://github.com/ACF-Team/CFW.git
synced 2025-03-04 03:03:16 -05:00
Add CFW_OnParentedTo
This commit is contained in:
parent
fd6b189d8d
commit
4fe6b1983d
@ -29,6 +29,10 @@ hook.Add("Initialize", "CFW", function()
|
||||
local validNewParent = IsValid(newParent)
|
||||
local validOldParent = IsValid(oldParent)
|
||||
|
||||
if self.CFW_OnParentedTo and self:CFW_OnParentedTo(oldParent, newParent, newAttach, ...) == false then
|
||||
return
|
||||
end
|
||||
|
||||
if (validOldParent and oldParent.CFW_OnParented) and not validNewParent then
|
||||
oldParent:CFW_OnParented(self, false)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user