Skip to content

Commit

Permalink
Merge pull request #6 from CheezusChrust/families-fix
Browse files Browse the repository at this point in the history
Account for parents not created by the multi parent tool
  • Loading branch information
TwistedTail authored Mar 21, 2024
2 parents 32fae6e + 430d10e commit 1a3c854
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lua/cfw/classes/family_sv.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ do -- Class def

hook.Run("cfw.family.added", self, entity)

for child in pairs(entity:GetChildren()) do
for k, v in pairs(entity:GetChildren()) do
local child = isnumber(k) and v or k
if child == entity then continue end
if child.CFW_NO_FAMILY_TRAVERSAL then continue end

Expand All @@ -66,7 +67,8 @@ do -- Class def

if isAncestor then return end

for child in pairs(entity:GetChildren()) do
for k, v in pairs(entity:GetChildren()) do
local child = isnumber(k) and v or k
if child == entity then continue end
if child.CFW_NO_FAMILY_TRAVERSAL then continue end

Expand Down

0 comments on commit 1a3c854

Please sign in to comment.