now BETTER_ALLCARSDODO_CHEAT tweak original cheat to be useful.

This commit is contained in:
Roman Masanin 2020-10-03 02:26:49 +03:00
parent 55d94c99b8
commit 063a80ecfb
5 changed files with 8 additions and 43 deletions

View File

@ -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
)))
{

View File

@ -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;

View File

@ -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

View File

@ -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
}

View File

@ -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;