summaryrefslogtreecommitdiffstats
path: root/src/core/Pad.cpp
diff options
context:
space:
mode:
authormajestic <majesticcoding@gmail.com>2020-06-14 14:57:27 +0200
committermajestic <majesticcoding@gmail.com>2020-06-14 16:53:45 +0200
commit015921522db77273d00b12a08d7c6114f07d0071 (patch)
tree8ad4957a2d36263e4de978e110fcc98bcc046298 /src/core/Pad.cpp
parentMerge pull request #625 from aap/miami (diff)
downloadre3-015921522db77273d00b12a08d7c6114f07d0071.tar
re3-015921522db77273d00b12a08d7c6114f07d0071.tar.gz
re3-015921522db77273d00b12a08d7c6114f07d0071.tar.bz2
re3-015921522db77273d00b12a08d7c6114f07d0071.tar.lz
re3-015921522db77273d00b12a08d7c6114f07d0071.tar.xz
re3-015921522db77273d00b12a08d7c6114f07d0071.tar.zst
re3-015921522db77273d00b12a08d7c6114f07d0071.zip
Diffstat (limited to 'src/core/Pad.cpp')
-rw-r--r--src/core/Pad.cpp50
1 files changed, 44 insertions, 6 deletions
diff --git a/src/core/Pad.cpp b/src/core/Pad.cpp
index 897923dd..ab66dd9b 100644
--- a/src/core/Pad.cpp
+++ b/src/core/Pad.cpp
@@ -38,6 +38,7 @@
#include "WaterLevel.h"
#include "General.h"
#include "Fluff.h"
+#include "Gangs.h"
CPad Pads[MAX_PADS];
CMousePointerStateHelper MousePointerStateHelper;
@@ -176,8 +177,11 @@ void HealthCheat()
FindPlayerPed()->m_fHealth = CWorld::Players[0].m_nMaxHealth;
if (FindPlayerVehicle()) {
FindPlayerVehicle()->m_fHealth = 1000.0f;
- if (FindPlayerVehicle()->m_vehType == VEHICLE_TYPE_CAR)
+ if (FindPlayerVehicle()->m_vehType == VEHICLE_TYPE_CAR) {
((CAutomobile*)FindPlayerVehicle())->Damage.SetEngineStatus(0);
+ for (int32 i = 0; i < 4; i++)
+ ((CAutomobile*)FindPlayerVehicle())->Damage.SetWheelStatus(i, WHEEL_STATUS_OK);
+ }
}
}
@@ -380,6 +384,12 @@ void NastyLimbsCheat()
CPed::bNastyLimbsCheat = !CPed::bNastyLimbsCheat;
}
+void FannyMagnetCheat()
+{
+ CHud::SetHelpMessage(TheText.Get("CHEAT1"), true);
+ CPed::bFannyMagnetCheat = !CPed::bFannyMagnetCheat;
+}
+
void BlackCarsCheat()
{
CHud::SetHelpMessage(TheText.Get("CHEAT1"), true);
@@ -418,6 +428,17 @@ void SuicideCheat(void) {
FindPlayerPed()->InflictDamage(nil, WEAPONTYPE_UNARMED, 1000.0f, PEDPIECE_TORSO, 0);
}
+void DoChicksWithGunsCheat(void) {
+ CHud::SetHelpMessage(TheText.Get("CHEAT1"), true);
+ CStreaming::SetModelIsDeletable(CGangs::GetGangPedModel1(GANG_PLAYER));
+ CStreaming::SetModelIsDeletable(CGangs::GetGangPedModel2(GANG_PLAYER));
+ CStreaming::SetModelTxdIsDeletable(CGangs::GetGangPedModel1(GANG_PLAYER));
+ CStreaming::SetModelTxdIsDeletable(CGangs::GetGangPedModel2(GANG_PLAYER));
+ CStreaming::RemoveCurrentZonesModels();
+ CGangs::SetGangPedModels(GANG_PLAYER, MI_HFYBE, MI_WFYBE);
+ CGangs::SetGangWeapons(GANG_PLAYER, WEAPONTYPE_M4, WEAPONTYPE_M4);
+}
+
//////////////////////////////////////////////////////////////////////////
#ifdef KANGAROO_CHEAT
@@ -474,6 +495,12 @@ void AltDodoCheat(void)
}
#endif
+void FlyingFishCheat(void)
+{
+ CHud::SetHelpMessage(TheText.Get("CHEAT1"), true);
+ CVehicle::bCheat8 = !CVehicle::bCheat8;
+}
+
bool
CControllerState::CheckForInput(void)
{
@@ -996,7 +1023,7 @@ int Cheat_strncmp(char* sourceStr, char* origCheatStr)
{
char cheatCodeVals[] = { 3,5,7,1,13,27,3,7,1,11,13,8,7,32,13,6,28,19,10,3,3,5,7,1,13,27,3,7 };
- for (int32 i = 0; i < strlen(origCheatStr); i++) {
+ for (uint32 i = 0; i < strlen(origCheatStr); i++) {
if ((sourceStr[i] != origCheatStr[i] - cheatCodeVals[i]) || i >= ARRAY_SIZE(cheatCodeVals)) {
return 1;
}
@@ -1120,6 +1147,7 @@ void CPad::AddToPCCheatString(char c)
//COMEFLYWITHME
else if (!Cheat_strncmp(KeyBoardCheatString, "HROUVr\\SGPZWJ")) {
KeyBoardCheatString[0] = ' ';
+ ChittyChittyBangBangCheat();
}
// "GRIPISEVERYTHING"
else if (!Cheat_strncmp(KeyBoardCheatString, "JSPIatULWP`QWi_M")) {
@@ -1133,6 +1161,7 @@ void CPad::AddToPCCheatString(char c)
// "CHICKSWITHGUNS"
else if (!Cheat_strncmp(KeyBoardCheatString, "VS\\HUoL^TVPQOc")) {
KeyBoardCheatString[0] = ' ';
+ DoChicksWithGunsCheat();
}
// "ICANTTAKEITANYMORE"
else if (!Cheat_strncmp(KeyBoardCheatString, "HWVNfiD[JPXI[t[G_\\")) {
@@ -1260,10 +1289,17 @@ void CPad::AddToPCCheatString(char c)
//CERTAINDEATH
else if (!Cheat_strncmp(KeyBoardCheatString, "KYHFQiLHU]RK")) {
KeyBoardCheatString[0] = ' ';
- if (!CSmokeTrails::CigOn)
- CSmokeTrails::CigOn = true;
- else
- CSmokeTrails::CigOn = false;
+ CSmokeTrails::CigOn = !CSmokeTrails::CigOn;
+ }
+ //AIRSHIP
+ else if (!Cheat_strncmp(KeyBoardCheatString, "SNOT_dD")) {
+ KeyBoardCheatString[0] = ' ';
+ FlyingFishCheat();
+ }
+ //FANNYMAGNET
+ else if (!Cheat_strncmp(KeyBoardCheatString, "WJUHNh\\UOLS")) {
+ KeyBoardCheatString[0] = ' ';
+ FannyMagnetCheat();
}
// "ILOVESCOTLAND"
if (!_CHEATCMP("DNALTOCSEVOLI"))
@@ -2671,6 +2707,7 @@ void CPad::ResetCheats(void)
CPopulation::ms_bGivePedsWeapons = false;
CPed::bNastyLimbsCheat = false;
+ CPed::bFannyMagnetCheat = false;
CPed::bPedCheat2 = false;
CPed::bPedCheat3 = false;
@@ -2679,6 +2716,7 @@ void CPad::ResetCheats(void)
CVehicle::bCheat3 = false;
CVehicle::bCheat4 = false;
CVehicle::bCheat5 = false;
+ CVehicle::bCheat8 = false;
gbBlackCars = false;
gbPinkCars = false;