diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-05-11 00:00:50 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-05-11 00:00:50 +0200 |
commit | 2f085ea5f585ac2a54bfa1eb51082b5f41a67184 (patch) | |
tree | 90b3006d9ff5aa65b753d27336d134d1cc783ce5 /src/vehicles/Vehicle.cpp | |
parent | some changes (diff) | |
parent | RpAnimBlend and frame updates (diff) | |
download | re3-2f085ea5f585ac2a54bfa1eb51082b5f41a67184.tar re3-2f085ea5f585ac2a54bfa1eb51082b5f41a67184.tar.gz re3-2f085ea5f585ac2a54bfa1eb51082b5f41a67184.tar.bz2 re3-2f085ea5f585ac2a54bfa1eb51082b5f41a67184.tar.lz re3-2f085ea5f585ac2a54bfa1eb51082b5f41a67184.tar.xz re3-2f085ea5f585ac2a54bfa1eb51082b5f41a67184.tar.zst re3-2f085ea5f585ac2a54bfa1eb51082b5f41a67184.zip |
Diffstat (limited to 'src/vehicles/Vehicle.cpp')
-rw-r--r-- | src/vehicles/Vehicle.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp index d0341058..b6045062 100644 --- a/src/vehicles/Vehicle.cpp +++ b/src/vehicles/Vehicle.cpp @@ -423,17 +423,16 @@ CVehicle::FlyingControl(eFlightModel flightModel) } else { fPitch = CPad::GetPad(0)->GetSteeringUpDown() / 128.0f; - fRoll = CPad::GetPad(0)->GetLookLeft(); - if (CPad::GetPad(0)->GetLookRight()) - fRoll = -1.0f; - fYaw = CPad::GetPad(0)->GetSteeringLeftRight() / 128.0f; + fYaw = CPad::GetPad(0)->GetLookRight(); + if (CPad::GetPad(0)->GetLookLeft()) + fYaw = -1.0f; + fRoll = -CPad::GetPad(0)->GetSteeringLeftRight() / 128.0f; } if (CPad::GetPad(0)->GetHorn()) { fYaw = 0.0f; fPitch = clamp(10.0f * DotProduct(m_vecMoveSpeed, GetUp()), -200.0f, 1.3f); fRoll = clamp(10.0f * DotProduct(m_vecMoveSpeed, GetRight()), -200.0f, 1.3f); } - debug("fPitch: %f\n", fPitch); ApplyTurnForce(fPitch * GetUp() * fPitchVar * m_fTurnMass * CTimer::GetTimeStep(), GetForward()); ApplyTurnForce(fRoll * GetUp() * fRollVar * m_fTurnMass * CTimer::GetTimeStep(), GetRight()); ApplyTurnForce(fYaw * GetForward() * fYawVar * m_fTurnMass * CTimer::GetTimeStep(), GetRight()); |