From 1335bfade25f8e48c6001b5fa7e388e67c9fee8c Mon Sep 17 00:00:00 2001 From: Denneisk <20892685+Denneisk@users.noreply.github.com> Date: Mon, 21 Oct 2024 18:29:04 +0000 Subject: [PATCH] Fix cursor parent using deprecated function (#3151) --- lua/entities/gmod_wire_egp/lib/egplib/parenting.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/entities/gmod_wire_egp/lib/egplib/parenting.lua b/lua/entities/gmod_wire_egp/lib/egplib/parenting.lua index 20a400331d..e1c9aba4bb 100644 --- a/lua/entities/gmod_wire_egp/lib/egplib/parenting.lua +++ b/lua/entities/gmod_wire_egp/lib/egplib/parenting.lua @@ -216,7 +216,7 @@ function EGP:SetParent( Ent, index, parentindex ) end if (bool) then if (parentindex == -1) then -- Parent to cursor? - if (self:EditObject( v, { parent = parentindex } )) then return true, v end + if (v:Set("parent", parentindex)) then return true, v end else if isnumber(parentindex) then bool = hasObject(Ent, parentindex) @@ -226,7 +226,7 @@ function EGP:SetParent( Ent, index, parentindex ) if (bool) then EGP:AddParentIndexes( v ) - if (SERVER) then parentindex = math.Clamp(parentindex,1,self.ConVars.MaxObjects:GetInt()) end + if (SERVER) then parentindex = math.Clamp(parentindex,1,EGP.ConVars.MaxObjects:GetInt()) end -- If it's already parented to that object if (v.parent and v.parent == parentindex) then return false end @@ -278,4 +278,4 @@ function EGP:UnParent( Ent, index ) if v:EditObject(data) then return true, v end end -end \ No newline at end of file +end