some datatype stuff; made raycasting a bit more efficient (shortens the line instead of just doing a distance compare)