From db0758690e78f8df8304adab345958ce5cf496ed Mon Sep 17 00:00:00 2001 From: Roman Masanin <36927roma@gmail.com> Date: Wed, 30 Sep 2020 13:37:43 +0300 Subject: [PATCH 1/5] new implementation for car fly enhancment --- src/vehicles/Automobile.cpp | 2 +- src/vehicles/Vehicle.cpp | 15 +++++++++++++-- 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) From fe46aa5cc25d52ec434860d4ee72fbb1347adbe9 Mon Sep 17 00:00:00 2001 From: Roman Masanin <36927roma@gmail.com> Date: Thu, 1 Oct 2020 02:20:09 +0300 Subject: [PATCH 2/5] better flying cars, some refractoring and fixes --- src/core/ControllerConfig.cpp | 3 +++ src/core/Pad.cpp | 20 ++++++++++++++------ src/core/config.h | 2 +- src/vehicles/Automobile.cpp | 18 ++++++++---------- src/vehicles/Vehicle.cpp | 35 ++++++++++++++++++++--------------- src/vehicles/Vehicle.h | 2 +- 6 files changed, 47 insertions(+), 33 deletions(-) diff --git a/src/core/ControllerConfig.cpp b/src/core/ControllerConfig.cpp index bdfab34c..71bacbbd 100644 --- a/src/core/ControllerConfig.cpp +++ b/src/core/ControllerConfig.cpp @@ -733,6 +733,9 @@ void CControllerConfigManager::AffectControllerStateOn_ButtonDown_Driving(int32 FindPlayerVehicle()->GetModelIndex() == MI_DODO #ifdef FIX_BUGS || (CVehicle::bAllDodosCheat && !FindPlayerVehicle()->IsRealHeli()) +#endif +#ifdef BETTER_ALLCARSAREDODO_CHEAT + || (CVehicle::bAltDodoCheat && !FindPlayerVehicle()->IsRealHeli()) #endif ))) { diff --git a/src/core/Pad.cpp b/src/core/Pad.cpp index 36e14e55..6e9a37b3 100644 --- a/src/core/Pad.cpp +++ b/src/core/Pad.cpp @@ -542,8 +542,8 @@ void AllCarsHeliCheat(void) } #endif -#ifdef ALT_DODO_CHEAT -void AltDodoCheat(void) +#ifdef BETTER_ALLCARSAREDODO_CHEAT +void AllCarsPlaneCheat(void) { wchar* string; if (CVehicle::bAltDodoCheat) { @@ -1444,10 +1444,10 @@ void CPad::AddToPCCheatString(char c) AllCarsHeliCheat(); #endif -#ifdef ALT_DODO_CHEAT - // "IWANTTOMASTERDODO" - if (!_CHEATCMP("ODODRETSAMOTTNAWI")) - AltDodoCheat(); +#ifdef BETTER_ALLCARSAREDODO_CHEAT + // "CARSAREPLANE" + if (!_CHEATCMP("ENALPERASRAC")) + AllCarsPlaneCheat(); #endif #ifdef WALLCLIMB_CHEAT @@ -3166,6 +3166,14 @@ void CPad::ResetCheats(void) CVehicle::bCheat4 = false; CVehicle::bCheat5 = false; CVehicle::bCheat8 = false; +#ifdef RESTORE_ALLCARSHELI_CHEAT + bAllCarCheat = false; +#endif +#ifdef BETTER_ALLCARSAREDODO_CHEAT + CVehicle::bAltDodoCheat = false; +#endif + + gbBlackCars = false; gbPinkCars = false; CCarCtrl::bMadDriversCheat = false; diff --git a/src/core/config.h b/src/core/config.h index 327230d0..475a63f8 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -251,7 +251,7 @@ enum Config { #define DETECT_PAD_INPUT_SWITCH // Adds automatic switch of pad related stuff between controller and kb/m #define KANGAROO_CHEAT #define RESTORE_ALLCARSHELI_CHEAT -#define ALT_DODO_CHEAT +#define BETTER_ALLCARSAREDODO_CHEAT #define WALLCLIMB_CHEAT #define REGISTER_START_BUTTON //#define BIND_VEHICLE_FIREWEAPON // Adds ability to rebind fire key for 'in vehicle' controls diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp index 24c84703..08fe7718 100644 --- a/src/vehicles/Automobile.cpp +++ b/src/vehicles/Automobile.cpp @@ -1375,6 +1375,13 @@ CAutomobile::ProcessControl(void) // Flying bool playRotorSound = false; + bool isPlane = GetModelIndex() == MI_DODO || bAllDodosCheat; +#ifdef BETTER_ALLCARSAREDODO_CHEAT + isPlane = isPlane || bAltDodoCheat; +#endif +#ifdef FIX_BUGS + isPlane = isPlane && !IsRealHeli(); +#endif if(GetStatus() != STATUS_PLAYER && GetStatus() != STATUS_PLAYER_REMOTE && GetStatus() != STATUS_PHYSICS){ if(IsRealHeli()){ bEngineOn = false; @@ -1383,16 +1390,7 @@ CAutomobile::ProcessControl(void) if(m_aWheelSpeed[1] < 0.154f && m_aWheelSpeed[1] > 0.0044f) playRotorSound = true; } - }else if((GetModelIndex() == MI_DODO || CVehicle::bAllDodosCheat) && -#ifdef FIX_BUGS - !IsRealHeli() && -#endif - m_vecMoveSpeed.Magnitude() > 0.0f && CTimer::GetTimeStep() > 0.0f){ -#ifdef ALT_DODO_CHEAT - if (bAltDodoCheat) - FlyingControl(FLIGHT_MODEL_PLANE_UNUSED); - else -#endif + }else if(isPlane && m_vecMoveSpeed.Magnitude() > 0.0f && CTimer::GetTimeStep() > 0.0f){ if(GetModelIndex() == MI_DODO) FlyingControl(FLIGHT_MODEL_DODO); else diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp index d53f3c9f..82bdcdda 100644 --- a/src/vehicles/Vehicle.cpp +++ b/src/vehicles/Vehicle.cpp @@ -41,7 +41,7 @@ bool CVehicle::bCheat3; bool CVehicle::bCheat4; bool CVehicle::bCheat5; bool CVehicle::bCheat8; -#ifdef ALT_DODO_CHEAT +#ifdef BETTER_ALLCARSAREDODO_CHEAT bool CVehicle::bAltDodoCheat; #endif bool CVehicle::bHoverCheat; @@ -351,25 +351,26 @@ CVehicle::FlyingControl(eFlightModel flightModel) fSteerUD *= -fSteerMult; // thrust - float fHandlingThrust = pFlyingHandling->fThrust; + float fThrust = pFlyingHandling->fThrust; float fThrustFallOff = pFlyingHandling->fThrustFallOff; float fThrustFallOffBack = pFlyingHandling->fThrustFallOff * 8.0f; -#ifdef ALT_DODO_CHEAT +#ifdef BETTER_ALLCARSAREDODO_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; + fThrust = pHandling->Transmission.fEngineAcceleration + * pHandling->Transmission.nDriveType == '4' ? 4.0f : 2.0f; + fThrust = 5.0f * Max(fThrust, pFlyingHandling->fThrust); + fThrustFallOff = Min(1.0f / pHandling->Transmission.fMaxVelocity, fThrustFallOff); + fThrustFallOffBack = -1.0f / pHandling->Transmission.fMaxReverseVelocity; } -#endif // ALT_DOOD_CHEAT +#endif 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 fPedalState = (CPad::GetPad(0)->GetAccelerate() - CPad::GetPad(0)->GetBrake()) / 255.0f; float fThrustAccel; - if(fForwSpeed > 0.0f || fThrust > 0.0f) - fThrustAccel = (fThrust - fThrustFallOff * fForwSpeed) * fHandlingThrust; + if(fForwSpeed > 0.0f || fPedalState > 0.0f) + fThrustAccel = (fPedalState - fThrustFallOff * fForwSpeed) * fThrust; else - fThrustAccel = Min(fThrust - fThrustFallOffBack * fForwSpeed, 0.0f) * fHandlingThrust; + fThrustAccel = Min(fPedalState - fThrustFallOffBack * fForwSpeed, 0.0f) * fThrust; if(flightModel == FLIGHT_MODEL_PLANE_UNUSED) fThrustAccel *= 0.3f; else if(flightModel == FLIGHT_MODEL_PLANE) @@ -407,14 +408,18 @@ CVehicle::FlyingControl(eFlightModel flightModel) float fPitchAccel = pFlyingHandling->fPitchStab * fTail * Abs(fTail) + pFlyingHandling->fPitch * fSteerUD * fForwSpeed; ApplyTurnForce(fPitchAccel * m_fTurnMass * GetUp() * CTimer::GetTimeStep(), vecTail); - float fLift = -DotProduct(GetMoveSpeed(), GetUp()) / Max(0.01f, GetMoveSpeed().Magnitude()); - float fLiftAccel = (pFlyingHandling->fAttackLift * fLift + pFlyingHandling->fFormLift) * fForwSpeed * fForwSpeed; + float fLift = DotProduct(GetMoveSpeed(), GetUp()) / Max(0.01f, GetMoveSpeed().Magnitude()); //accel*angle + float fLiftAccel = (pFlyingHandling->fFormLift - pFlyingHandling->fAttackLift * fLift) * SQR(fForwSpeed); float fLiftImpulse = fLiftAccel * m_fMass * CTimer::GetTimeStep(); if (GRAVITY * CTimer::GetTimeStep() * m_fMass < fLiftImpulse) { if (flightModel == FLIGHT_MODEL_RCPLANE && GetPosition().z > 50.0f) fLiftImpulse = CTimer::GetTimeStep() * 0.9f*GRAVITY * m_fMass; else if (flightModel == FLIGHT_MODEL_SEAPLANE && GetPosition().z > 80.0f) fLiftImpulse = CTimer::GetTimeStep() * 0.9f*GRAVITY * m_fMass; +#ifdef BETTER_ALLCARSAREDODO_CHEAT + else if(GetPosition().z > 180.0f) + fLiftImpulse = CTimer::GetTimeStep() * 0.9f * GRAVITY * m_fMass; +#endif } ApplyMoveForce(fLiftImpulse * GetUp()); @@ -444,7 +449,7 @@ CVehicle::FlyingControl(eFlightModel flightModel) case FLIGHT_MODEL_HELI: { #ifdef RESTORE_ALLCARSHELI_CHEAT - tFlyingHandlingData* flyingHandling = bAllCarCheat && GetStatus() == STATUS_PLAYER && !IsRealHeli() ? mod_HandlingManager.GetFlyingPointer(HANDLING_MAVERICK) : pFlyingHandling; + tFlyingHandlingData* flyingHandling = bAllCarCheat && !IsRealHeli() ? mod_HandlingManager.GetFlyingPointer(HANDLING_MAVERICK) : pFlyingHandling; #else tFlyingHandlingData* flyingHandling = pFlyingHandling; #endif diff --git a/src/vehicles/Vehicle.h b/src/vehicles/Vehicle.h index 34106327..30f84ede 100644 --- a/src/vehicles/Vehicle.h +++ b/src/vehicles/Vehicle.h @@ -400,7 +400,7 @@ public: static bool bCheat4; static bool bCheat5; static bool bCheat8; -#ifdef ALT_DODO_CHEAT +#ifdef BETTER_ALLCARSAREDODO_CHEAT static bool bAltDodoCheat; #endif static bool bHoverCheat; From 049c993ce01570fd6aae8166b6622a81f343ef2e Mon Sep 17 00:00:00 2001 From: Roman Masanin <36927roma@gmail.com> Date: Thu, 1 Oct 2020 02:45:24 +0300 Subject: [PATCH 3/5] fix ternary operator --- src/vehicles/Vehicle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp index 82bdcdda..3ff9a044 100644 --- a/src/vehicles/Vehicle.cpp +++ b/src/vehicles/Vehicle.cpp @@ -357,7 +357,7 @@ CVehicle::FlyingControl(eFlightModel flightModel) #ifdef BETTER_ALLCARSAREDODO_CHEAT if (bAltDodoCheat && !IsRealPlane()) { fThrust = pHandling->Transmission.fEngineAcceleration - * pHandling->Transmission.nDriveType == '4' ? 4.0f : 2.0f; + * (pHandling->Transmission.nDriveType == '4' ? 4.0f : 2.0f); fThrust = 5.0f * Max(fThrust, pFlyingHandling->fThrust); fThrustFallOff = Min(1.0f / pHandling->Transmission.fMaxVelocity, fThrustFallOff); fThrustFallOffBack = -1.0f / pHandling->Transmission.fMaxReverseVelocity; From 063a80ecfb3ccede8b2e5efc135abd2c48f285d2 Mon Sep 17 00:00:00 2001 From: Roman Masanin <36927roma@gmail.com> Date: Sat, 3 Oct 2020 02:26:49 +0300 Subject: [PATCH 4/5] now BETTER_ALLCARSDODO_CHEAT tweak original cheat to be useful. --- src/core/ControllerConfig.cpp | 3 --- src/core/Pad.cpp | 31 ++++--------------------------- src/vehicles/Automobile.cpp | 3 --- src/vehicles/Vehicle.cpp | 11 ++++------- src/vehicles/Vehicle.h | 3 --- 5 files changed, 8 insertions(+), 43 deletions(-) diff --git a/src/core/ControllerConfig.cpp b/src/core/ControllerConfig.cpp index 222e9e34..51e942d0 100644 --- a/src/core/ControllerConfig.cpp +++ b/src/core/ControllerConfig.cpp @@ -741,9 +741,6 @@ void CControllerConfigManager::AffectControllerStateOn_ButtonDown_Driving(int32 FindPlayerVehicle()->GetModelIndex() == MI_DODO #ifdef FIX_BUGS || (CVehicle::bAllDodosCheat && !FindPlayerVehicle()->IsRealHeli()) -#endif -#ifdef BETTER_ALLCARSAREDODO_CHEAT - || (CVehicle::bAltDodoCheat && !FindPlayerVehicle()->IsRealHeli()) #endif ))) { diff --git a/src/core/Pad.cpp b/src/core/Pad.cpp index 6e9a37b3..910a8c52 100644 --- a/src/core/Pad.cpp +++ b/src/core/Pad.cpp @@ -412,7 +412,11 @@ void OnlyRenderWheelsCheat() void ChittyChittyBangBangCheat() { +#ifdef BETTER_ALLCARSAREDODO_CHEAT + CHud::SetHelpMessage(TheText.Get(!CVehicle::bAllDodosCheat ? "CHEAT1" : "CHEATOF"), true); +#else CHud::SetHelpMessage(TheText.Get("CHEAT1"), true); +#endif CVehicle::bAllDodosCheat = !CVehicle::bAllDodosCheat; CStats::CheatedCount += 1000; CPad::bHasPlayerCheated = true; @@ -542,22 +546,6 @@ void AllCarsHeliCheat(void) } #endif -#ifdef BETTER_ALLCARSAREDODO_CHEAT -void AllCarsPlaneCheat(void) -{ - wchar* string; - if (CVehicle::bAltDodoCheat) { - string = TheText.Get("CHEATOF"); - CVehicle::bAltDodoCheat = false; - } - else { - string = TheText.Get("CHEAT1"); - CVehicle::bAltDodoCheat = true; - } - CHud::SetHelpMessage(string, true); -} -#endif - #ifdef WALLCLIMB_CHEAT void WallClimbingCheat(void) { @@ -1444,12 +1432,6 @@ void CPad::AddToPCCheatString(char c) AllCarsHeliCheat(); #endif -#ifdef BETTER_ALLCARSAREDODO_CHEAT - // "CARSAREPLANE" - if (!_CHEATCMP("ENALPERASRAC")) - AllCarsPlaneCheat(); -#endif - #ifdef WALLCLIMB_CHEAT // "SPIDERCAR" if (!_CHEATCMP("RACREDIPS")) @@ -3169,11 +3151,6 @@ void CPad::ResetCheats(void) #ifdef RESTORE_ALLCARSHELI_CHEAT bAllCarCheat = false; #endif -#ifdef BETTER_ALLCARSAREDODO_CHEAT - CVehicle::bAltDodoCheat = false; -#endif - - gbBlackCars = false; gbPinkCars = false; CCarCtrl::bMadDriversCheat = false; diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp index 08fe7718..2d6fc740 100644 --- a/src/vehicles/Automobile.cpp +++ b/src/vehicles/Automobile.cpp @@ -1376,9 +1376,6 @@ CAutomobile::ProcessControl(void) bool playRotorSound = false; bool isPlane = GetModelIndex() == MI_DODO || bAllDodosCheat; -#ifdef BETTER_ALLCARSAREDODO_CHEAT - isPlane = isPlane || bAltDodoCheat; -#endif #ifdef FIX_BUGS isPlane = isPlane && !IsRealHeli(); #endif diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp index 3ff9a044..4347c9b2 100644 --- a/src/vehicles/Vehicle.cpp +++ b/src/vehicles/Vehicle.cpp @@ -41,9 +41,6 @@ bool CVehicle::bCheat3; bool CVehicle::bCheat4; bool CVehicle::bCheat5; bool CVehicle::bCheat8; -#ifdef BETTER_ALLCARSAREDODO_CHEAT -bool CVehicle::bAltDodoCheat; -#endif bool CVehicle::bHoverCheat; bool CVehicle::bAllTaxisHaveNitro; bool CVehicle::m_bDisableMouseSteering = true; @@ -355,11 +352,11 @@ CVehicle::FlyingControl(eFlightModel flightModel) float fThrustFallOff = pFlyingHandling->fThrustFallOff; float fThrustFallOffBack = pFlyingHandling->fThrustFallOff * 8.0f; #ifdef BETTER_ALLCARSAREDODO_CHEAT - if (bAltDodoCheat && !IsRealPlane()) { + if (bAllDodosCheat && !IsRealPlane()) { fThrust = pHandling->Transmission.fEngineAcceleration * (pHandling->Transmission.nDriveType == '4' ? 4.0f : 2.0f); - fThrust = 5.0f * Max(fThrust, pFlyingHandling->fThrust); - fThrustFallOff = Min(1.0f / pHandling->Transmission.fMaxVelocity, fThrustFallOff); + fThrust = 5.0f * Max(fThrust, pFlyingHandling->fThrust); //tweak: (cars engines too weak to thrust car on air) + fThrustFallOff = Min(0.7f / pHandling->Transmission.fMaxVelocity, fThrustFallOff); //tweak: (use 0.7 instead of 1.0 to make cars 30% faster) fThrustFallOffBack = -1.0f / pHandling->Transmission.fMaxReverseVelocity; } #endif @@ -417,7 +414,7 @@ CVehicle::FlyingControl(eFlightModel flightModel) else if (flightModel == FLIGHT_MODEL_SEAPLANE && GetPosition().z > 80.0f) fLiftImpulse = CTimer::GetTimeStep() * 0.9f*GRAVITY * m_fMass; #ifdef BETTER_ALLCARSAREDODO_CHEAT - else if(GetPosition().z > 180.0f) + else if(bAllDodosCheat && GetPosition().z > 170.0f) fLiftImpulse = CTimer::GetTimeStep() * 0.9f * GRAVITY * m_fMass; #endif } diff --git a/src/vehicles/Vehicle.h b/src/vehicles/Vehicle.h index 30f84ede..6bd6f7c6 100644 --- a/src/vehicles/Vehicle.h +++ b/src/vehicles/Vehicle.h @@ -400,9 +400,6 @@ public: static bool bCheat4; static bool bCheat5; static bool bCheat8; -#ifdef BETTER_ALLCARSAREDODO_CHEAT - static bool bAltDodoCheat; -#endif static bool bHoverCheat; static bool bAllTaxisHaveNitro; static bool m_bDisableMouseSteering; From 1b3144f978e31c88b49d34c2ea4a1824d6f7c85d Mon Sep 17 00:00:00 2001 From: Roman Masanin <36927roma@gmail.com> Date: Sun, 4 Oct 2020 19:03:34 +0300 Subject: [PATCH 5/5] back to the future style wheels on flying --- src/vehicles/Automobile.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp index 2d6fc740..01a4f094 100644 --- a/src/vehicles/Automobile.cpp +++ b/src/vehicles/Automobile.cpp @@ -2589,6 +2589,10 @@ CAutomobile::PreRender(void) CGeneral::GetRandomNumberInRange(0.0f, 90.0f), CGeneral::GetRandomNumberInRange(0.0f, 10.0f), 1); } +#ifdef BETTER_ALLCARSAREDODO_CHEAT + } else if (bAllDodosCheat && m_nDriveWheelsOnGround == 0 && m_nDriveWheelsOnGroundPrev == 0) { + mat.RotateY(-HALFPI); +#endif }else{ // tilt wheel depending oh how much it presses on ground float groundOffset = pos.z + m_fHeightAboveRoad - 0.5f*mi->m_wheelScale; @@ -2626,6 +2630,10 @@ CAutomobile::PreRender(void) CGeneral::GetRandomNumberInRange(0.0f, 90.0f), CGeneral::GetRandomNumberInRange(0.0f, 10.0f), 1); } +#ifdef BETTER_ALLCARSAREDODO_CHEAT + } else if (bAllDodosCheat && m_nDriveWheelsOnGround == 0 && m_nDriveWheelsOnGroundPrev == 0) { + mat.RotateY(HALFPI); +#endif }else{ // tilt wheel depending oh how much it presses on ground float groundOffset = pos.z + m_fHeightAboveRoad - 0.5f*mi->m_wheelScale; @@ -2655,6 +2663,10 @@ CAutomobile::PreRender(void) m_aWheelColPoints[CARWHEEL_REAR_RIGHT].surfaceB == SURFACE_WATER){ // hovering on water mat.RotateY(-HALFPI); +#ifdef BETTER_ALLCARSAREDODO_CHEAT + } else if (bAllDodosCheat && m_nDriveWheelsOnGround == 0 && m_nDriveWheelsOnGroundPrev == 0) { + mat.RotateY(-HALFPI); +#endif }else{ // tilt wheel depending oh how much it presses on ground float groundOffset = pos.z + m_fHeightAboveRoad - 0.5f*mi->m_wheelScale; @@ -2685,6 +2697,10 @@ CAutomobile::PreRender(void) m_aWheelColPoints[CARWHEEL_REAR_LEFT].surfaceB == SURFACE_WATER){ // hovering on water mat.RotateY(HALFPI); +#ifdef BETTER_ALLCARSAREDODO_CHEAT + } else if (bAllDodosCheat && m_nDriveWheelsOnGround == 0 && m_nDriveWheelsOnGroundPrev == 0) { + mat.RotateY(HALFPI); +#endif }else{ // tilt wheel depending oh how much it presses on ground float groundOffset = pos.z + m_fHeightAboveRoad - 0.5f*mi->m_wheelScale; @@ -2815,6 +2831,10 @@ CAutomobile::PreRender(void) CGeneral::GetRandomNumberInRange(0.0f, 90.0f), CGeneral::GetRandomNumberInRange(0.0f, 10.0f), 1); } +#ifdef BETTER_ALLCARSAREDODO_CHEAT + } else if (bAllDodosCheat && m_nDriveWheelsOnGround == 0 && m_nDriveWheelsOnGroundPrev == 0) { + mat.RotateY(-HALFPI); +#endif }else{ // tilt wheel depending oh how much it presses on ground float groundOffset = pos.z + m_fHeightAboveRoad - 0.5f*mi->m_wheelScale; @@ -2852,6 +2872,10 @@ CAutomobile::PreRender(void) CGeneral::GetRandomNumberInRange(0.0f, 90.0f), CGeneral::GetRandomNumberInRange(0.0f, 10.0f), 1); } +#ifdef BETTER_ALLCARSAREDODO_CHEAT + } else if (bAllDodosCheat && m_nDriveWheelsOnGround == 0 && m_nDriveWheelsOnGroundPrev == 0) { + mat.RotateY(HALFPI); +#endif }else{ // tilt wheel depending oh how much it presses on ground float groundOffset = pos.z + m_fHeightAboveRoad - 0.5f*mi->m_wheelScale;