summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoman Masanin <36927roma@gmail.com>2020-09-30 12:37:43 +0200
committerRoman Masanin <36927roma@gmail.com>2020-09-30 12:37:43 +0200
commitdb0758690e78f8df8304adab345958ce5cf496ed (patch)
tree9ebf1c3b51085f55370e78dc1651eb6401238aa9
parentMerge remote-tracking branch 'origin/master' into miami (diff)
downloadre3-db0758690e78f8df8304adab345958ce5cf496ed.tar
re3-db0758690e78f8df8304adab345958ce5cf496ed.tar.gz
re3-db0758690e78f8df8304adab345958ce5cf496ed.tar.bz2
re3-db0758690e78f8df8304adab345958ce5cf496ed.tar.lz
re3-db0758690e78f8df8304adab345958ce5cf496ed.tar.xz
re3-db0758690e78f8df8304adab345958ce5cf496ed.tar.zst
re3-db0758690e78f8df8304adab345958ce5cf496ed.zip
-rw-r--r--src/vehicles/Automobile.cpp2
-rw-r--r--src/vehicles/Vehicle.cpp15
2 files changed, 14 insertions, 3 deletions
diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp
index 05596e75..24c84703 100644
--- a/src/vehicles/Automobile.cpp
+++ b/src/vehicles/Automobile.cpp
@@ -1390,7 +1390,7 @@ CAutomobile::ProcessControl(void)
m_vecMoveSpeed.Magnitude() > 0.0f && CTimer::GetTimeStep() > 0.0f){
#ifdef ALT_DODO_CHEAT
if (bAltDodoCheat)
- FlyingControl(FLIGHT_MODEL_PLANE);
+ FlyingControl(FLIGHT_MODEL_PLANE_UNUSED);
else
#endif
if(GetModelIndex() == MI_DODO)
diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp
index 2e790e81..d53f3c9f 100644
--- a/src/vehicles/Vehicle.cpp
+++ b/src/vehicles/Vehicle.cpp
@@ -351,14 +351,25 @@ CVehicle::FlyingControl(eFlightModel flightModel)
fSteerUD *= -fSteerMult;
// thrust
+ float fHandlingThrust = pFlyingHandling->fThrust;
+ float fThrustFallOff = pFlyingHandling->fThrustFallOff;
+ float fThrustFallOffBack = pFlyingHandling->fThrustFallOff * 8.0f;
+#ifdef ALT_DODO_CHEAT
+ if (bAltDodoCheat && !IsRealPlane()) {
+ fHandlingThrust = pHandling->Transmission.fEngineAcceleration;
+ fHandlingThrust *= pHandling->Transmission.nDriveType == '4' ? 4 : 2;
+ fThrustFallOff = 0.7f / pHandling->Transmission.fMaxVelocity;
+ fThrustFallOffBack = 0.7f / pHandling->Transmission.fMaxReverseVelocity;
+ }
+#endif // ALT_DOOD_CHEAT
float fForwSpeed = DotProduct(GetMoveSpeed(), GetForward());
CVector vecTail = GetColModel()->boundingBox.min.y * GetForward();
float fThrust = (CPad::GetPad(0)->GetAccelerate() - CPad::GetPad(0)->GetBrake()) / 255.0f;
float fThrustAccel;
if(fForwSpeed > 0.0f || fThrust > 0.0f)
- fThrustAccel = (fThrust - pFlyingHandling->fThrustFallOff * fForwSpeed) * pFlyingHandling->fThrust;
+ fThrustAccel = (fThrust - fThrustFallOff * fForwSpeed) * fHandlingThrust;
else
- fThrustAccel = Min(fThrust - 8.0f * pFlyingHandling->fThrustFallOff * fForwSpeed, 0.0f) * pFlyingHandling->fThrust;
+ fThrustAccel = Min(fThrust - fThrustFallOffBack * fForwSpeed, 0.0f) * fHandlingThrust;
if(flightModel == FLIGHT_MODEL_PLANE_UNUSED)
fThrustAccel *= 0.3f;
else if(flightModel == FLIGHT_MODEL_PLANE)