fix(client/zones): convert vector4 to vector3

Sometimes people send the incorrect types, and it's apparently on us (???)
to allow them to do the wrong thing and catch their mistakes for them.
This commit is contained in:
Linden
2022-11-09 16:04:03 +11:00
parent c6b0c4cb39
commit 9b7eef2880

View File

@@ -360,7 +360,7 @@ local function convertToVector(coords)
local _type = type(coords)
if _type ~= 'vector3' then
if _type == 'table' then
if _type == 'table' or _type == 'vector4' then
return vec3(coords[1] or coords.x, coords[2] or coords.y, coords[3] or coords.z)
end
@@ -439,4 +439,4 @@ lib.zones = {
end,
}
return lib.zones
return lib.zones