mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user