From 90912c0b9020976cef1b1e1934594e8d878e4c69 Mon Sep 17 00:00:00 2001 From: tovjemam Date: Sat, 20 Jun 2026 20:50:50 +0200 Subject: [PATCH] (Hopefully) fix vehicle wheels not turning after some time --- src/game/vehicle.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/game/vehicle.cpp b/src/game/vehicle.cpp index 80442d5..67c6984 100644 --- a/src/game/vehicle.cpp +++ b/src/game/vehicle.cpp @@ -416,6 +416,7 @@ void game::Vehicle::UpdateWheels() { auto& bt_wheel = vehicle.getWheelInfo(i); wheels_[i].speed = -(bt_wheel.m_rotation - wheels_[i].rotation) * 25.0f; + bt_wheel.m_rotation = glm::mod(bt_wheel.m_rotation, glm::two_pi()); // prevent going too crazy wheels_[i].rotation = bt_wheel.m_rotation; wheels_[i].z_offset = tuning_ctx_.wheels[i].z_offset - bt_wheel.m_raycastInfo.m_suspensionLength;