Lightmesh now works, problems with vertices ordering

Changing so mesh scans for all objects first, puts them in order of
increasing angles and then puts them through light generator
Lightmesh now works, apart from the last vertex

Last vertex swapping with the third at some angles, need to fix. Also
need to provide endpoint for mesh so the furthest edge away doesn't
cross over game area