Skip to content

Commit 4fe6b19

Browse files
committed
Add CFW_OnParentedTo
1 parent fd6b189 commit 4fe6b19

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lua/cfw/core/parenting_sv.lua

+4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ hook.Add("Initialize", "CFW", function()
2929
local validNewParent = IsValid(newParent)
3030
local validOldParent = IsValid(oldParent)
3131

32+
if self.CFW_OnParentedTo and self:CFW_OnParentedTo(oldParent, newParent, newAttach, ...) == false then
33+
return
34+
end
35+
3236
if (validOldParent and oldParent.CFW_OnParented) and not validNewParent then
3337
oldParent:CFW_OnParented(self, false)
3438
end

0 commit comments

Comments
 (0)