From a99ce596d7e73e677abfba427cb1da0e912c0517 Mon Sep 17 00:00:00 2001 From: hut Date: Wed, 15 May 2024 15:07:07 +0200 Subject: [PATCH] keep cruise control going when the game is not focused --- src/camera.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/camera.rs b/src/camera.rs index 1379342..be0e19b 100644 --- a/src/camera.rs +++ b/src/camera.rs @@ -429,6 +429,10 @@ pub fn apply_input_to_player( axis_input += 1.0 * DVec3::from(player_transform.rotation.inverse() * stop_direction.as_vec3()); } } + } else { + if settings.cruise_control_active { + axis_input.z += 1.2; + } } // In typical games we would normalize the input vector so that diagonal movement is as // fast as forward or sideways movement. But here, we merely clamp each direction to an