From d3cf75e0d5d27f7f8c35f62a3f25411ea5fef59c Mon Sep 17 00:00:00 2001 From: Quaternions Date: Fri, 10 Nov 2023 18:29:53 -0800 Subject: [PATCH] fix ladder crashes --- src/physics.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/physics.rs b/src/physics.rs index d81638c..36edcf3 100644 --- a/src/physics.rs +++ b/src/physics.rs @@ -613,7 +613,16 @@ impl StyleModifiers{ //two fixes: //- ladder movement is not allowed on walkable surfaces //- fix the underlying issue - normal.cross(control_dir).cross(*normal)*(self.ladder_speed/(n*(n*n-d*d).sqrt())) + if d.get().unsigned_abs()Planar64Vec3{ let camera_mat=camera.simulate_move_rotation(camera.mouse.lerp(&next_mouse,time));