mirror of
https://github.com/1bardesign/batteries.git
synced 2024-11-22 06:04:35 +00:00
[modified] intersect.lua imports vec2 unconditionally rather than attempting to use the global
This commit is contained in:
parent
6386aaf298
commit
02568f8f08
@ -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 = {}
|
||||
|
Loading…
Reference in New Issue
Block a user