diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2021-01-18 20:19:50 +0100 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2021-01-18 20:19:50 +0100 |
commit | 239dd551467f3713f0ebb523003a25e68710f767 (patch) | |
tree | db2fc41de7de33e6610b172583b803a2954b3dd9 /src/vehicles/Boat.cpp | |
parent | fix attempt (diff) | |
parent | fix (diff) | |
download | re3-239dd551467f3713f0ebb523003a25e68710f767.tar re3-239dd551467f3713f0ebb523003a25e68710f767.tar.gz re3-239dd551467f3713f0ebb523003a25e68710f767.tar.bz2 re3-239dd551467f3713f0ebb523003a25e68710f767.tar.lz re3-239dd551467f3713f0ebb523003a25e68710f767.tar.xz re3-239dd551467f3713f0ebb523003a25e68710f767.tar.zst re3-239dd551467f3713f0ebb523003a25e68710f767.zip |
Diffstat (limited to 'src/vehicles/Boat.cpp')
-rw-r--r-- | src/vehicles/Boat.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/vehicles/Boat.cpp b/src/vehicles/Boat.cpp index e3bcf096..eae764b4 100644 --- a/src/vehicles/Boat.cpp +++ b/src/vehicles/Boat.cpp @@ -72,7 +72,7 @@ CBoat::CBoat(int mi, uint8 owner) : CVehicle(owner) m_fMass = pHandling->fMass; m_fTurnMass = pHandling->fTurnMass / 2.0f; m_vecCentreOfMass = pHandling->CentreOfMass; - 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.1f; m_fBuoyancy = pHandling->fBuoyancy; m_fSteerAngle = 0.0f; @@ -965,7 +965,14 @@ CBoat::PreRender(void) // FIX: Planes can also be controlled with GetCarGunUpDown #ifdef FIX_BUGS static float steeringUpDown = 0.0f; - steeringUpDown += ((Abs(CPad::GetPad(0)->GetCarGunUpDown()) > 1.0f ? (-CPad::GetPad(0)->GetCarGunUpDown() / 128.0f) : (-CPad::GetPad(0)->GetSteeringUpDown() / 128.0f)) - steeringUpDown) * Min(1.f, CTimer::GetTimeStep() / 5.f); +#ifdef FREE_CAM + if(!CCamera::bFreeCam || (CCamera::bFreeCam && !CPad::IsAffectedByController)) +#endif + steeringUpDown += ((Abs(CPad::GetPad(0)->GetCarGunUpDown()) > 1.0f ? (-CPad::GetPad(0)->GetCarGunUpDown()/128.0f) : (-CPad::GetPad(0)->GetSteeringUpDown()/128.0f)) - steeringUpDown) * Min(1.f, CTimer::GetTimeStep()/5.f); +#ifdef FREE_CAM + else + steeringUpDown = -CPad::GetPad(0)->GetSteeringUpDown()/128.0f; +#endif #else float steeringUpDown = -CPad::GetPad(0)->GetSteeringUpDown()/128.0f; #endif |