made raytracing more sensible and multiplayer compatible (oops)