From 9b7eef28809faaf0b9572056b24e58381b74aee7 Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Wed, 9 Nov 2022 16:04:03 +1100 Subject: [PATCH] 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. --- imports/zones/client.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/imports/zones/client.lua b/imports/zones/client.lua index dafdaf1..461fc5a 100644 --- a/imports/zones/client.lua +++ b/imports/zones/client.lua @@ -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 \ No newline at end of file +return lib.zones