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: better flying cars, some refractoring and fixes --- src/core/ControllerConfig.cpp | 3 +++ src/core/Pad.cpp | 20 ++++++++++++++------ src/core/config.h | 2 +- 3 files changed, 18 insertions(+), 7 deletions(-) (limited to 'src/core') 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 -- cgit v1.2.3 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: now BETTER_ALLCARSDODO_CHEAT tweak original cheat to be useful. --- src/core/ControllerConfig.cpp | 3 --- src/core/Pad.cpp | 31 ++++--------------------------- 2 files changed, 4 insertions(+), 30 deletions(-) (limited to 'src/core') 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; -- cgit v1.2.3