Fix StyleCopy for named-field vectors (Style Editor assert)

This commit is contained in:
4DBug committed 2026-10-08 10:33:05 -05:00
1 parent 642151ec43
commit e7d576d656
3 files changed
+13 -2

No files matched your search

+1 -1
View File
@@ -21982,7 +21982,7 @@ local function StyleCopy(dst, src)
elseif type(v) == "table" and getmetatable(v) ~= nil and type(v[1]) == "number" then
local c = dst[k]
if type(c) ~= "table" then c = setmetatable({}, getmetatable(v)); dst[k] = c end
for _, key in ipairs({ "x", "y", "z", "w" }) do if rawget(v, key) ~= nil then c[key] = v[key] end end
for _, key in ipairs({ "x", "y", "z", "w" }) do if rawget(v, key) ~= nil then rawset(c, key, rawget(v, key)) end end
else
dst[k] = v
end