Notes:
- Version: latest git
- Unverified in singleplayer yet without other addons, sorry :(
Steps to reproduce:
- Spawn two props
- Rope them together
- in console try executing
dupe_save
- Observe error in console:
gamemodes/sandbox/entities/weapons/gmod_tool/stools/duplicator/transport.lua:30:
attempt to serialize structure with cyclic reference
The issue is due to the entity table having cycles, namely _contraption's CostObj:
I don't know the codebase enough but likely it seems to be related to
|
-- This function has caused headaches in other codebases (wiremod's cam controllers for example) and should've always been namedspaced... |
Or rather CFW_GetContraption should do something like:
local cfw_contraptions = {}
...
function ENT:CFW_GetContraption()
return cfw_contraptions[self]
end
...
function CLASS:Add(ent)
cfw_contraptions[ent] = self
end
(and same for links, etc)
Notes:
Steps to reproduce:
dupe_saveThe issue is due to the entity table having cycles, namely
_contraption'sCostObj:I don't know the codebase enough but likely it seems to be related to
CFW/lua/cfw/classes/contraption_sv.lua
Line 31 in 5bb6f9f
Or rather CFW_GetContraption should do something like:
(and same for links, etc)