summaryrefslogtreecommitdiffstats
path: root/src/vehicles/Bike.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-12-08 06:52:03 +0100
committerSergeanur <s.anureev@yandex.ua>2020-12-08 06:52:03 +0100
commitf3e9c82432a260fa88ed8bc1d4a7432fd4a4fdba (patch)
tree5f59716adfd44cb5e8e7f03d5503d8d8e01b015d /src/vehicles/Bike.cpp
parentFix bike's fInAirXRes (diff)
downloadre3-f3e9c82432a260fa88ed8bc1d4a7432fd4a4fdba.tar
re3-f3e9c82432a260fa88ed8bc1d4a7432fd4a4fdba.tar.gz
re3-f3e9c82432a260fa88ed8bc1d4a7432fd4a4fdba.tar.bz2
re3-f3e9c82432a260fa88ed8bc1d4a7432fd4a4fdba.tar.lz
re3-f3e9c82432a260fa88ed8bc1d4a7432fd4a4fdba.tar.xz
re3-f3e9c82432a260fa88ed8bc1d4a7432fd4a4fdba.tar.zst
re3-f3e9c82432a260fa88ed8bc1d4a7432fd4a4fdba.zip
Diffstat (limited to '')
-rw-r--r--src/vehicles/Bike.cpp3
1 files changed, 2 insertions, 1 deletions
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){