[modified] intersect.lua imports vec2 unconditionally rather than attempting to use the global

This commit is contained in:
Max Cahill 2020-04-07 13:51:13 +10:00
parent 6386aaf298
commit 02568f8f08

View File

@ -13,13 +13,8 @@
so these functions can be reentrant
]]
--import vec2 if not defined globally
local global_vec2 = vec2
local vec2 = global_vec2
if not vec2 then
local vec2_path = (...):gsub("intersect", "vec2")
vec2 = require(vec2_path)
end
local path = (...):gsub("intersect", "")
local vec2 = require(path .. "vec2")
--module storage
local intersect = {}