From da92e5c2837b27433286cf0dd9d887fd44dda254 Mon Sep 17 00:00:00 2001 From: Sébastien Crozet Date: Sat, 27 Jan 2024 16:49:53 +0100 Subject: Fix clippy and enable clippy on CI --- src/control/ray_cast_vehicle_controller.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/control') diff --git a/src/control/ray_cast_vehicle_controller.rs b/src/control/ray_cast_vehicle_controller.rs index 30979e1..00b11eb 100644 --- a/src/control/ray_cast_vehicle_controller.rs +++ b/src/control/ray_cast_vehicle_controller.rs @@ -582,7 +582,7 @@ impl DynamicRayCastVehicleController { wheel.side_impulse = resolve_single_bilateral( &bodies[self.chassis], &wheel.raycast_info.contact_point_ws, - &ground_body, + ground_body, &wheel.raycast_info.contact_point_ws, &self.axle[i], ); @@ -664,11 +664,9 @@ impl DynamicRayCastVehicleController { if sliding { for wheel in &mut self.wheels { - if wheel.side_impulse != 0.0 { - if wheel.skid_info < 1.0 { - wheel.forward_impulse *= wheel.skid_info; - wheel.side_impulse *= wheel.skid_info; - } + if wheel.side_impulse != 0.0 && wheel.skid_info < 1.0 { + wheel.forward_impulse *= wheel.skid_info; + wheel.side_impulse *= wheel.skid_info; } } } -- cgit