From f3e9c82432a260fa88ed8bc1d4a7432fd4a4fdba Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Tue, 8 Dec 2020 07:52:03 +0200 Subject: Pool fixes from master --- src/vehicles/Bike.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/vehicles/Bike.cpp') diff --git a/src/vehicles/Bike.cpp b/src/vehicles/Bike.cpp index 3a0be35f..faf31077 100644 --- a/src/vehicles/Bike.cpp +++ b/src/vehicles/Bike.cpp @@ -1213,7 +1213,8 @@ CBike::ProcessControl(void) // Balance bike if(bBalancedByRider || bIsBeingPickedUp || bIsStanding){ - float onSideness = clamp(DotProduct(GetRight(), m_vecAvgSurfaceNormal), -1.0f, 1.0f); + float onSideness = DotProduct(GetRight(), m_vecAvgSurfaceNormal); + onSideness = clamp(onSideness, -1.0f, 1.0f); CVector worldCOM = Multiply3x3(GetMatrix(), m_vecCentreOfMass); // Keep bike upright if(bBalancedByRider){ -- cgit v1.2.3