I’ve had no problems with them in SinglePlayer or on a Dedi. Regardless:

[lua] – generic math functions

local function add_v3v3(a, b)

return Vector(a.x + b.x, a.y + b.y, a.z + b.z)

end

local function sub_v3v3(a, b)

return Vector(a.x - b.x, a.y - b.y, a.z - b.z)

end

local function dot_v3v3(a, b)

return a.x * b.x + a.y * b.y + a.z * b.z

end

local function mul_v3_fl(a, f)

a.x = a.x * f

a.y = a.y * f

a.z = a.z * f

return a

end

– intersection function

local function isect_line_plane_v3(p0, p1, p_co, p_no, epsilon)

epsilon = 0.000001

–[[

p0, p1: define the line

p_co, p_no: define the plane:

p_co is a point on the plane (plane coordinate).

p_no is a normal vector defining the plane direction; does not need to be normalized.

```
return a Vector or None (when the intersection can't be found).
http://stackoverflow.com/questions/5666222/3d-line-plane-intersection
--]]
local u = sub_v3v3(p1, p0)
local w = sub_v3v3(p0, p_co)
local dot = dot_v3v3(p_no, u)
if math.abs(dot) > epsilon then
--[[
the factor of the point between p0 -> p1 (0 - 1)
if 'fac' is between (0 - 1) the point intersects with the segment.
otherwise:
< 0.0: behind p0.
> 1.0: infront of p1.
--]]
local fac = -dot_v3v3(p_no, w) / dot
u = mul_v3_fl(u, fac)
return add_v3v3(p0, u)
else
-- The segment is parallel to plane
return nil
end
```

end[/lua]

I used this magic for vector plane intersection.