Skip to content

Commit

Permalink
Merge constraint tables
Browse files Browse the repository at this point in the history
  • Loading branch information
wrefgtzweve committed Jul 24, 2024
1 parent da911a4 commit 5bdd15e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lua/fpp/server/ownability.lua
Original file line number Diff line number Diff line change
Expand Up @@ -503,11 +503,10 @@ local function constraintRemovedTimer(ent1, ent2)
if not IsValid(ent1) and not IsValid(ent2) then return end
entMem = {}

local constrainedEnts1 = constraint.GetAllConstrainedEntities(ent1)
FPP.RecalculateConstrainedEntities(player.GetAll(), constrainedEnts1)

local constrainedEnts2 = constraint.GetAllConstrainedEntities(ent2)
FPP.RecalculateConstrainedEntities(player.GetAll(), constrainedEnts2)
local allConstrainedEnts = {}
table.Add(allConstrainedEnts, constrainedEnts1)
table.Add(allConstrainedEnts, constrainedEnts2)
FPP.RecalculateConstrainedEntities(player.GetAll(), allConstrainedEnts)
end

local function handleConstraintRemoved(ent)
Expand Down

0 comments on commit 5bdd15e

Please sign in to comment.