diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/Pad.cpp | 50 | ||||
-rw-r--r-- | src/core/Streaming.cpp | 29 |
2 files changed, 65 insertions, 14 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; diff --git a/src/core/Streaming.cpp b/src/core/Streaming.cpp index 985b28c9..d560a695 100644 --- a/src/core/Streaming.cpp +++ b/src/core/Streaming.cpp @@ -1554,19 +1554,32 @@ CStreaming::RemoveCurrentZonesModels(void) { int i; - if(ms_currentPedGrp != -1) - for(i = 0; i < NUMMODELSPERPEDGROUP; i++){ - if(CPopulation::ms_pPedGroups[ms_currentPedGrp].models[i] == -1) + if (ms_currentPedGrp != -1) + for (i = 0; i < NUMMODELSPERPEDGROUP; i++) { + if (CPopulation::ms_pPedGroups[ms_currentPedGrp].models[i] == -1) break; - if(CPopulation::ms_pPedGroups[ms_currentPedGrp].models[i] != MI_MALE01) + if (CPopulation::ms_pPedGroups[ms_currentPedGrp].models[i] != MI_MALE01) { SetModelIsDeletable(CPopulation::ms_pPedGroups[ms_currentPedGrp].models[i]); + SetModelTxdIsDeletable(CPopulation::ms_pPedGroups[ms_currentPedGrp].models[i]); + } } - for(i = 0; i < NUM_GANGS; i++){ - SetModelIsDeletable(CGangs::GetGangPedModel1(i)); - SetModelIsDeletable(CGangs::GetGangPedModel2(i)); - if(CGangs::GetGangVehicleModel(i) != -1) + CStreaming::RequestModel(MI_MALE01, STREAMFLAGS_DONT_REMOVE); + CStreaming::RequestModel(MI_TAXI_D, STREAMFLAGS_DONT_REMOVE); + + for (i = 0; i < NUM_GANGS; i++) { + if (CGangs::GetGangPedModel1(i) != -1) { + SetModelIsDeletable(CGangs::GetGangPedModel1(i)); + SetModelTxdIsDeletable(CGangs::GetGangPedModel1(i)); + } + if (CGangs::GetGangPedModel2(i) != -1) { + SetModelIsDeletable(CGangs::GetGangPedModel2(i)); + SetModelTxdIsDeletable(CGangs::GetGangPedModel2(i)); + } + if (CGangs::GetGangVehicleModel(i) != -1) { SetModelIsDeletable(CGangs::GetGangVehicleModel(i)); + SetModelTxdIsDeletable(CGangs::GetGangVehicleModel(i)); + } } ms_currentPedGrp = -1; |