Rewrote large parts of the collision detection system again, I found that it is just not feasible to do this using integer arithmetic only. Now it's using floats, which should work better.