diff options
author | Roman Masanin <36927roma@gmail.com> | 2020-09-30 12:37:43 +0200 |
---|---|---|
committer | Roman Masanin <36927roma@gmail.com> | 2020-09-30 12:37:43 +0200 |
commit | db0758690e78f8df8304adab345958ce5cf496ed (patch) | |
tree | 9ebf1c3b51085f55370e78dc1651eb6401238aa9 /src/vehicles/Vehicle.cpp | |
parent | Merge remote-tracking branch 'origin/master' into miami (diff) | |
download | re3-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 |
Diffstat (limited to '')
-rw-r--r-- | src/vehicles/Vehicle.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
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) |