I noticed the util.add_shift seems to only take the array form of the Vector type or Vector concept. It can only be assumed it was intended on being used in the shift of graphics definitions, and can subsequently fail in those applications.
The fix would be to rewrite it as something like this:
Code: Select all
function util.add_shift(a, b)
if not (a and b) then
return a or b
end
return {
(a[1] or a.x) + (b[1] or b.x),
(a[2] or a.y) + (b[2] or b.y)
}
end
