diff options
author | Fire-Head <Fire-Head@users.noreply.github.com> | 2021-01-20 23:00:39 +0100 |
---|---|---|
committer | Fire-Head <Fire-Head@users.noreply.github.com> | 2021-01-20 23:00:39 +0100 |
commit | 4ba19c9556a94cba65a5033467e9fe2346f604bb (patch) | |
tree | 79620db1c87618fddbe9866d6c7019ee67f64e57 /src/vehicles/Bike.cpp | |
parent | Merge pull request #1 from GTAmodding/lcs (diff) | |
parent | fix (diff) | |
download | re3-4ba19c9556a94cba65a5033467e9fe2346f604bb.tar re3-4ba19c9556a94cba65a5033467e9fe2346f604bb.tar.gz re3-4ba19c9556a94cba65a5033467e9fe2346f604bb.tar.bz2 re3-4ba19c9556a94cba65a5033467e9fe2346f604bb.tar.lz re3-4ba19c9556a94cba65a5033467e9fe2346f604bb.tar.xz re3-4ba19c9556a94cba65a5033467e9fe2346f604bb.tar.zst re3-4ba19c9556a94cba65a5033467e9fe2346f604bb.zip |
Diffstat (limited to 'src/vehicles/Bike.cpp')
-rw-r--r-- | src/vehicles/Bike.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/vehicles/Bike.cpp b/src/vehicles/Bike.cpp index 293cf58e..2c2b9468 100644 --- a/src/vehicles/Bike.cpp +++ b/src/vehicles/Bike.cpp @@ -111,7 +111,7 @@ CBike::CBike(int32 id, uint8 CreatedBy) m_fTurnMass = pHandling->fTurnMass; m_vecCentreOfMass = pHandling->CentreOfMass; m_vecCentreOfMass.z = 0.1f; - m_fAirResistance = pHandling->Dimension.x*pHandling->Dimension.z/m_fMass; + m_fAirResistance = pHandling->fDragMult > 0.01f ? pHandling->fDragMult*0.0005f : pHandling->fDragMult; m_fElasticity = 0.05f; m_fBuoyancy = pHandling->fBuoyancy; @@ -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); |