Deep-copying tables with Vectors/Angles in Starfall
š¼ļø Renderingā¢Updated 2 days agoā¢0 views
Vectors and Angles implement a clone method and are themselves tables copied by reference - a plain table.copy won't deep-copy them. table.copy caches already-cā¦
Is there a difference between single-file and multi-file Lua, and how to deep-copy structures containing Vectors
Vectors and Angles implement a clone method and are themselves tables copied by reference - a plain table.copy won't deep-copy them. table.copy caches already-copied tables and keeps metatables; a custom recursive copy should use val:clone() for Vector/Angle types.