fix constraints disappearing after dupe, fixed #25

This commit is contained in:
Sevii 2021-06-19 11:56:11 +02:00
parent 31abf4ed41
commit 7aac61650c

View File

@ -162,11 +162,12 @@ function ProperClipping.ApplyPhysObjData(physobj, physdata, keepmass)
for _, data in ipairs(physdata.constraints) do
local con = dConstraints[data.Type]
local args = {}
local id = ""
for i, arg in ipairs(con.Args) do
args[i] = data[arg]
id = id .. tostring(data[arg]) .. "\0"
end
local id = util.TableToJSON(args)
if not constraint_timers[id] then
constraint_timers[id] = true