summaryrefslogtreecommitdiffstats
path: root/src/vehicles/Bike.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vehicles/Bike.cpp')
-rw-r--r--src/vehicles/Bike.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/vehicles/Bike.cpp b/src/vehicles/Bike.cpp
index 17d8592e..d588e777 100644
--- a/src/vehicles/Bike.cpp
+++ b/src/vehicles/Bike.cpp
@@ -1844,7 +1844,12 @@ CBike::ProcessControlInputs(uint8 pad)
m_fSteerInput = clamp(m_fSteerInput, -1.0f, 1.0f);
// Lean forward/backward
- float updown = -CPad::GetPad(pad)->GetSteeringUpDown()/128.0f + CPad::GetPad(pad)->GetCarGunUpDown()/128.0f;
+ float updown;
+#ifdef FREE_CAM
+ if (CCamera::bFreeCam) updown = CPad::IsAffectedByController ? -CPad::GetPad(pad)->GetSteeringUpDown()/128.0f : CPad::GetPad(pad)->GetCarGunUpDown()/128.0f;
+ else
+#endif
+ updown = -CPad::GetPad(pad)->GetSteeringUpDown()/128.0f + CPad::GetPad(pad)->GetCarGunUpDown()/128.0f;
m_fLeanInput += (updown - m_fLeanInput)*0.2f*CTimer::GetTimeStep();
m_fLeanInput = clamp(m_fLeanInput, -1.0f, 1.0f);