diff options
author | majestic <majesticcoding@gmail.com> | 2020-06-14 14:57:27 +0200 |
---|---|---|
committer | majestic <majesticcoding@gmail.com> | 2020-06-14 16:53:45 +0200 |
commit | 015921522db77273d00b12a08d7c6114f07d0071 (patch) | |
tree | 8ad4957a2d36263e4de978e110fcc98bcc046298 /src | |
parent | Merge pull request #625 from aap/miami (diff) | |
download | re3-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 '')
-rw-r--r-- | src/core/Pad.cpp | 50 | ||||
-rw-r--r-- | src/core/Streaming.cpp | 29 | ||||
-rw-r--r-- | src/modelinfo/ModelIndices.h | 60 | ||||
-rw-r--r-- | src/peds/Ped.cpp | 6 | ||||
-rw-r--r-- | src/peds/Ped.h | 1 | ||||
-rw-r--r-- | src/vehicles/Boat.cpp | 58 | ||||
-rw-r--r-- | src/vehicles/Vehicle.cpp | 1 | ||||
-rw-r--r-- | src/vehicles/Vehicle.h | 1 |
8 files changed, 177 insertions, 29 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; diff --git a/src/modelinfo/ModelIndices.h b/src/modelinfo/ModelIndices.h index ad7b4aaf..99929a3b 100644 --- a/src/modelinfo/ModelIndices.h +++ b/src/modelinfo/ModelIndices.h @@ -159,14 +159,62 @@ enum MI_TAXI_D = 28, // HMOCA - MI_BMYBB = 47, - MI_WMOST = 52, - MI_WMYBE = 58, + MI_HFYST = 9, + MI_HFOST, + MI_HMYST, + MI_HMOST, + MI_HFYRI, + MI_HFORI, + MI_HMYRI, + MI_HMORI, + MI_HFYBE, + MI_HFOBE, + MI_HMYBE, + MI_HMOBE, + MI_HFYBU, + MI_HFYMD, + MI_HFYCG, + MI_HFYPR, + MI_HFOTR, + MI_HMOTR, + MI_HMYAP, + MI_HMOCA, + MI_BMODK, + MI_BMYKR, + MI_BFYST, + MI_BFOST, + MI_BMYST, + MI_BMOST, + MI_BFYRI, + MI_BFORI, + MI_BMYRI, + MI_BFYBE, + MI_BMYBE, + MI_BFOBE, + MI_BMOBE, + MI_BMYBU, + MI_BFYPR, + MI_BFOTR, + MI_BMOTR, + MI_BMYPI, + MI_BMYBB, + MI_WMYCR, + MI_WFYST, + MI_WFOST, + MI_WMIST, + MI_WMOST, + MI_WFYRI, + MI_WFORI, + MI_WMYRI, + MI_WMORI, + MI_WFYBE, + MI_WMYBE, MI_WFOBE, MI_WMOBE, - - MI_WFOGO = 63, - MI_WMOGO = 64, + MI_WMYCW, + MI_WMYGO, + MI_WFOGO, + MI_WMOGO, MI_CBA = 83, MI_CBB, diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp index e484cd50..1c895551 100644 --- a/src/peds/Ped.cpp +++ b/src/peds/Ped.cpp @@ -98,6 +98,7 @@ CVector vecPedDirtBikeJumpRhsAnimOffset; CVector vecPedBikeKickAnimOffset; bool CPed::bNastyLimbsCheat; +bool CPed::bFannyMagnetCheat; bool CPed::bPedCheat2; bool CPed::bPedCheat3; CVector2D CPed::ms_vec2DFleePosition; @@ -11419,6 +11420,11 @@ CPed::ProcessControl(void) #ifndef VC_PED_PORTS m_pCurrentPhysSurface = nil; #endif + if (bFannyMagnetCheat && m_nPedType == PEDTYPE_CIVFEMALE + && m_pedStats->m_sexiness > 40 && !m_leader) { + SetLeader(FindPlayerPed()); + } + } else { if (bIsStanding && (!m_pCurrentPhysSurface || IsPlayer()) || bIsInWater || !bUsesCollision) { diff --git a/src/peds/Ped.h b/src/peds/Ped.h index 6338b889..f1a0a45f 100644 --- a/src/peds/Ped.h +++ b/src/peds/Ped.h @@ -1056,6 +1056,7 @@ public: static uint16 nEnterCarRangeMultiplier; static bool bNastyLimbsCheat; + static bool bFannyMagnetCheat; static bool bPedCheat2; static bool bPedCheat3; static CVector2D ms_vec2DFleePosition; diff --git a/src/vehicles/Boat.cpp b/src/vehicles/Boat.cpp index 2da58ed7..6bc8ef0c 100644 --- a/src/vehicles/Boat.cpp +++ b/src/vehicles/Boat.cpp @@ -55,6 +55,7 @@ CBoat::CBoat(int mi, uint8 owner) : CVehicle(owner) SetModelIndex(mi); pHandling = mod_HandlingManager.GetHandlingData((eHandlingId)minfo->m_handlingId); + pFlyingHandling = mod_HandlingManager.GetFlyingPointer((eHandlingId)minfo->m_handlingId); minfo->ChooseVehicleColour(m_currentColour1, m_currentColour2); m_fMass = pHandling->fMass; @@ -545,6 +546,28 @@ CBoat::ProcessControl(void) } } + if (m_modelIndex == MI_SKIMMER && CTimer::GetTimeStep() > 0.0f) { + if (GetStatus() == STATUS_PLAYER) { + if (m_fPropellerY <= CTimer::GetTimeStep() * 0.0005f) { + m_fPropellerY = 0.0f; + } + else { + m_fPropellerY -= CTimer::GetTimeStep() * 0.0005f; + } + } + else { + if (m_fPropellerY < 0.22f) { + m_fPropellerY += CTimer::GetTimeStep() * 0.001f; + } + FlyingControl(FLIGHT_MODEL_SEAPLANE); + } + } + else { + if (bCheat8) { + FlyingControl(FLIGHT_MODEL_PLANE); + } + } + ProcessDelayedExplosion(); } @@ -563,7 +586,7 @@ CBoat::ProcessControlInputs(uint8 pad) m_fAccelerate += (CPad::GetPad(pad)->GetAccelerate()/255.0f - m_fAccelerate)*0.1f; m_fAccelerate = clamp(m_fAccelerate, 0.0f, 1.0f); }else - m_fAccelerate = -m_fBrake*0.2f; + m_fAccelerate = -m_fBrake*0.3f; m_fSteeringLeftRight += (-CPad::GetPad(pad)->GetSteeringLeftRight()/128.0f - m_fSteeringLeftRight)*0.2f; m_fSteeringLeftRight = clamp(m_fSteeringLeftRight, -1.0f, 1.0f); @@ -912,18 +935,35 @@ void CBoat::AddWakePoint(CVector point) { int i; - if(m_afWakePointLifeTime[0] > 0.0f){ - if((CVector2D(GetPosition()) - m_avec2dWakePoints[0]).MagnitudeSqr() < SQR(1.0f)){ - for(i = Min(m_nNumWakePoints, ARRAY_SIZE(m_afWakePointLifeTime)-1); i != 0; i--){ - m_avec2dWakePoints[i] = m_avec2dWakePoints[i-1]; - m_afWakePointLifeTime[i] = m_afWakePointLifeTime[i-1]; + if (m_afWakePointLifeTime[0] > 0.0f) { + if ((CVector2D(GetPosition()) - m_avec2dWakePoints[0]).MagnitudeSqr() < SQR(2.0f)) { + if (GetStatus() == STATUS_PHYSICS) { + if (VehicleCreatedBy == MISSION_VEHICLE) { + if (m_nNumWakePoints >= 20) + m_nNumWakePoints = 20; + } + else { + if (m_nNumWakePoints >= 15) + m_nNumWakePoints = 15; + } + } + else { + if (m_nNumWakePoints >= 31) + m_nNumWakePoints = 31; + } + for (i = m_nNumWakePoints; i != 0; i--) { + m_avec2dWakePoints[i] = m_avec2dWakePoints[i - 1]; + m_afWakePointLifeTime[i] = m_afWakePointLifeTime[i - 1]; } m_avec2dWakePoints[0] = point; - m_afWakePointLifeTime[0] = 400.0f; + m_afWakePointLifeTime[0] = 150.0f; + if (m_nNumWakePoints < 32) + ++m_nNumWakePoints; } - }else{ + } + else { m_avec2dWakePoints[0] = point; - m_afWakePointLifeTime[0] = 400.0f; + m_afWakePointLifeTime[0] = 150.0f; m_nNumWakePoints = 1; } } diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp index 824aeac1..2c770834 100644 --- a/src/vehicles/Vehicle.cpp +++ b/src/vehicles/Vehicle.cpp @@ -40,6 +40,7 @@ bool CVehicle::bAllDodosCheat; bool CVehicle::bCheat3; bool CVehicle::bCheat4; bool CVehicle::bCheat5; +bool CVehicle::bCheat8; #ifdef ALT_DODO_CHEAT bool CVehicle::bAltDodoCheat; #endif diff --git a/src/vehicles/Vehicle.h b/src/vehicles/Vehicle.h index 6be16c83..b1e3d803 100644 --- a/src/vehicles/Vehicle.h +++ b/src/vehicles/Vehicle.h @@ -399,6 +399,7 @@ public: static bool bCheat3; static bool bCheat4; static bool bCheat5; + static bool bCheat8; #ifdef ALT_DODO_CHEAT static bool bAltDodoCheat; #endif |