summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-04-25 15:47:39 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-04-25 15:47:39 +0200
commit40ec6362917ece931e8b00dd71e42c523ef53256 (patch)
treec0f2ee6a8e5a514ab50d2300818996f9c63b915f
parentMerge remote-tracking branch 'upstream/master' (diff)
downloadre3-40ec6362917ece931e8b00dd71e42c523ef53256.tar
re3-40ec6362917ece931e8b00dd71e42c523ef53256.tar.gz
re3-40ec6362917ece931e8b00dd71e42c523ef53256.tar.bz2
re3-40ec6362917ece931e8b00dd71e42c523ef53256.tar.lz
re3-40ec6362917ece931e8b00dd71e42c523ef53256.tar.xz
re3-40ec6362917ece931e8b00dd71e42c523ef53256.tar.zst
re3-40ec6362917ece931e8b00dd71e42c523ef53256.zip
-rw-r--r--src/vehicles/Vehicle.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp
index ef706f11..a3bb705a 100644
--- a/src/vehicles/Vehicle.cpp
+++ b/src/vehicles/Vehicle.cpp
@@ -202,7 +202,7 @@ const float fSeaPropFallOff = 2.3f;
const float fSeaThrust = 0.002f;
const float fSeaSideSlipMult = 0.1f;
const float fSeaRudderMult = 0.01f;
-const float fSeaYawMult = 0.0003f;
+const float fSeaYawMult = -0.0003f;
const float fSeaRollMult = 0.0015f;
const float fSeaRollStabilise = -0.01f;
const float fSeaPitchMult = 0.0002f;
@@ -316,7 +316,7 @@ CVehicle::FlyingControl(eFlightModel flightModel)
CVector vecFRight = CrossProduct(GetForward(), CVector(0.0f, 0.0f, 1.0f));
CVector vecStabilise = (GetUp().z > 0.0f) ? vecFRight : -vecFRight;
- float fStabiliseDirection = (GetUp().z > 0.0f) ? -1.0f : 1.0f;
+ float fStabiliseDirection = (GetRight().z > 0.0f) ? -1.0f : 1.0f;
float fStabiliseImpulse;
if (flightModel == FLIGHT_MODEL_RCPLANE)
fStabiliseImpulse = fRCRollStabilise * fStabiliseDirection * (1.0f - DotProduct(GetRight(), vecStabilise)) * (1.0f - Abs(GetForward().z));
@@ -332,14 +332,14 @@ CVehicle::FlyingControl(eFlightModel flightModel)
fPitchImpulse = fRCTailMult * fTail * Abs(fTail) + fRCPitchMult * fSteerUD * fForwSpeed;
else
fPitchImpulse = fSeaTailMult * fTail * Abs(fTail) + fSeaPitchMult * fSteerUD * fForwSpeed;
- ApplyTurnForce(fPitchImpulse* m_fTurnMass* GetRight()* CTimer::GetTimeStep(), vecWidthForward);
+ ApplyTurnForce(fPitchImpulse* m_fTurnMass* GetUp()* CTimer::GetTimeStep(), vecWidthForward);
float fLift = -DotProduct(GetMoveSpeed(), GetUp()) / Max(0.01f, GetMoveSpeed().Magnitude());
float fLiftImpluse;
if (flightModel == FLIGHT_MODEL_RCPLANE)
fLiftImpluse = (fRCAttackLiftMult * fLift + fRCFormLiftMult) * fForwSpeed * fForwSpeed;
else
- fLiftImpluse = fSeaAttackLiftMult * fLift + fSeaFormLiftMult * fForwSpeed * fForwSpeed;
+ fLiftImpluse = (fSeaAttackLiftMult * fLift + fSeaFormLiftMult) * fForwSpeed * fForwSpeed;
float fLiftForce = fLiftImpluse * m_fMass * CTimer::GetTimeStep();
if (GRAVITY * CTimer::GetTimeStep() * m_fMass < fLiftImpluse) {
if (flightModel == FLIGHT_MODEL_RCPLANE && GetPosition().z > 50.0f)