Merge pull request #632 from majesticCoding/miami

expanded modelIndices, more original cheats, slightly edited CStreami…
This commit is contained in:
erorcun 2020-06-16 23:08:16 +03:00 committed by GitHub
commit ee456481cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 178 additions and 33 deletions

View File

@ -38,6 +38,7 @@
#include "WaterLevel.h" #include "WaterLevel.h"
#include "General.h" #include "General.h"
#include "Fluff.h" #include "Fluff.h"
#include "Gangs.h"
CPad Pads[MAX_PADS]; CPad Pads[MAX_PADS];
CMousePointerStateHelper MousePointerStateHelper; CMousePointerStateHelper MousePointerStateHelper;
@ -176,8 +177,11 @@ void HealthCheat()
FindPlayerPed()->m_fHealth = CWorld::Players[0].m_nMaxHealth; FindPlayerPed()->m_fHealth = CWorld::Players[0].m_nMaxHealth;
if (FindPlayerVehicle()) { if (FindPlayerVehicle()) {
FindPlayerVehicle()->m_fHealth = 1000.0f; FindPlayerVehicle()->m_fHealth = 1000.0f;
if (FindPlayerVehicle()->m_vehType == VEHICLE_TYPE_CAR) if (FindPlayerVehicle()->m_vehType == VEHICLE_TYPE_CAR) {
((CAutomobile*)FindPlayerVehicle())->Damage.SetEngineStatus(0); ((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; CPed::bNastyLimbsCheat = !CPed::bNastyLimbsCheat;
} }
void FannyMagnetCheat()
{
CHud::SetHelpMessage(TheText.Get("CHEAT1"), true);
CPed::bFannyMagnetCheat = !CPed::bFannyMagnetCheat;
}
void BlackCarsCheat() void BlackCarsCheat()
{ {
CHud::SetHelpMessage(TheText.Get("CHEAT1"), true); CHud::SetHelpMessage(TheText.Get("CHEAT1"), true);
@ -418,6 +428,17 @@ void SuicideCheat(void) {
FindPlayerPed()->InflictDamage(nil, WEAPONTYPE_UNARMED, 1000.0f, PEDPIECE_TORSO, 0); 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 #ifdef KANGAROO_CHEAT
@ -474,6 +495,12 @@ void AltDodoCheat(void)
} }
#endif #endif
void FlyingFishCheat(void)
{
CHud::SetHelpMessage(TheText.Get("CHEAT1"), true);
CVehicle::bCheat8 = !CVehicle::bCheat8;
}
bool bool
CControllerState::CheckForInput(void) 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 }; 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)) { if ((sourceStr[i] != origCheatStr[i] - cheatCodeVals[i]) || i >= ARRAY_SIZE(cheatCodeVals)) {
return 1; return 1;
} }
@ -1120,6 +1147,7 @@ void CPad::AddToPCCheatString(char c)
//COMEFLYWITHME //COMEFLYWITHME
else if (!Cheat_strncmp(KeyBoardCheatString, "HROUVr\\SGPZWJ")) { else if (!Cheat_strncmp(KeyBoardCheatString, "HROUVr\\SGPZWJ")) {
KeyBoardCheatString[0] = ' '; KeyBoardCheatString[0] = ' ';
ChittyChittyBangBangCheat();
} }
// "GRIPISEVERYTHING" // "GRIPISEVERYTHING"
else if (!Cheat_strncmp(KeyBoardCheatString, "JSPIatULWP`QWi_M")) { else if (!Cheat_strncmp(KeyBoardCheatString, "JSPIatULWP`QWi_M")) {
@ -1133,6 +1161,7 @@ void CPad::AddToPCCheatString(char c)
// "CHICKSWITHGUNS" // "CHICKSWITHGUNS"
else if (!Cheat_strncmp(KeyBoardCheatString, "VS\\HUoL^TVPQOc")) { else if (!Cheat_strncmp(KeyBoardCheatString, "VS\\HUoL^TVPQOc")) {
KeyBoardCheatString[0] = ' '; KeyBoardCheatString[0] = ' ';
DoChicksWithGunsCheat();
} }
// "ICANTTAKEITANYMORE" // "ICANTTAKEITANYMORE"
else if (!Cheat_strncmp(KeyBoardCheatString, "HWVNfiD[JPXI[t[G_\\")) { else if (!Cheat_strncmp(KeyBoardCheatString, "HWVNfiD[JPXI[t[G_\\")) {
@ -1260,10 +1289,17 @@ void CPad::AddToPCCheatString(char c)
//CERTAINDEATH //CERTAINDEATH
else if (!Cheat_strncmp(KeyBoardCheatString, "KYHFQiLHU]RK")) { else if (!Cheat_strncmp(KeyBoardCheatString, "KYHFQiLHU]RK")) {
KeyBoardCheatString[0] = ' '; KeyBoardCheatString[0] = ' ';
if (!CSmokeTrails::CigOn) CSmokeTrails::CigOn = !CSmokeTrails::CigOn;
CSmokeTrails::CigOn = true; }
else //AIRSHIP
CSmokeTrails::CigOn = false; else if (!Cheat_strncmp(KeyBoardCheatString, "SNOT_dD")) {
KeyBoardCheatString[0] = ' ';
FlyingFishCheat();
}
//FANNYMAGNET
else if (!Cheat_strncmp(KeyBoardCheatString, "WJUHNh\\UOLS")) {
KeyBoardCheatString[0] = ' ';
FannyMagnetCheat();
} }
// "ILOVESCOTLAND" // "ILOVESCOTLAND"
if (!_CHEATCMP("DNALTOCSEVOLI")) if (!_CHEATCMP("DNALTOCSEVOLI"))
@ -2671,6 +2707,7 @@ void CPad::ResetCheats(void)
CPopulation::ms_bGivePedsWeapons = false; CPopulation::ms_bGivePedsWeapons = false;
CPed::bNastyLimbsCheat = false; CPed::bNastyLimbsCheat = false;
CPed::bFannyMagnetCheat = false;
CPed::bPedCheat2 = false; CPed::bPedCheat2 = false;
CPed::bPedCheat3 = false; CPed::bPedCheat3 = false;
@ -2679,6 +2716,7 @@ void CPad::ResetCheats(void)
CVehicle::bCheat3 = false; CVehicle::bCheat3 = false;
CVehicle::bCheat4 = false; CVehicle::bCheat4 = false;
CVehicle::bCheat5 = false; CVehicle::bCheat5 = false;
CVehicle::bCheat8 = false;
gbBlackCars = false; gbBlackCars = false;
gbPinkCars = false; gbPinkCars = false;

View File

@ -1558,15 +1558,28 @@ CStreaming::RemoveCurrentZonesModels(void)
for (i = 0; i < NUMMODELSPERPEDGROUP; i++) { for (i = 0; i < NUMMODELSPERPEDGROUP; i++) {
if (CPopulation::ms_pPedGroups[ms_currentPedGrp].models[i] == -1) if (CPopulation::ms_pPedGroups[ms_currentPedGrp].models[i] == -1)
break; 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]); SetModelIsDeletable(CPopulation::ms_pPedGroups[ms_currentPedGrp].models[i]);
SetModelTxdIsDeletable(CPopulation::ms_pPedGroups[ms_currentPedGrp].models[i]);
}
} }
CStreaming::RequestModel(MI_MALE01, STREAMFLAGS_DONT_REMOVE);
CStreaming::RequestModel(MI_TAXI_D, STREAMFLAGS_DONT_REMOVE);
for (i = 0; i < NUM_GANGS; i++) { for (i = 0; i < NUM_GANGS; i++) {
if (CGangs::GetGangPedModel1(i) != -1) {
SetModelIsDeletable(CGangs::GetGangPedModel1(i)); SetModelIsDeletable(CGangs::GetGangPedModel1(i));
SetModelTxdIsDeletable(CGangs::GetGangPedModel1(i));
}
if (CGangs::GetGangPedModel2(i) != -1) {
SetModelIsDeletable(CGangs::GetGangPedModel2(i)); SetModelIsDeletable(CGangs::GetGangPedModel2(i));
if(CGangs::GetGangVehicleModel(i) != -1) SetModelTxdIsDeletable(CGangs::GetGangPedModel2(i));
}
if (CGangs::GetGangVehicleModel(i) != -1) {
SetModelIsDeletable(CGangs::GetGangVehicleModel(i)); SetModelIsDeletable(CGangs::GetGangVehicleModel(i));
SetModelTxdIsDeletable(CGangs::GetGangVehicleModel(i));
}
} }
ms_currentPedGrp = -1; ms_currentPedGrp = -1;

View File

@ -157,16 +157,63 @@ enum
MI_FIREMAN, MI_FIREMAN,
MI_MALE01, MI_MALE01,
MI_TAXI_D = 28, // HMOCA MI_HFYST = 9,
MI_HFOST,
MI_BMYBB = 47, MI_HMYST,
MI_WMOST = 52, MI_HMOST,
MI_WMYBE = 58, 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_TAXI_D = 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_WFOBE,
MI_WMOBE, MI_WMOBE,
MI_WMYCW,
MI_WFOGO = 63, MI_WMYGO,
MI_WMOGO = 64, MI_WFOGO,
MI_WMOGO,
MI_CBA = 83, MI_CBA = 83,
MI_CBB, MI_CBB,

View File

@ -130,6 +130,7 @@ CVector vecPedDirtBikeJumpRhsAnimOffset;
CVector vecPedBikeKickAnimOffset; CVector vecPedBikeKickAnimOffset;
bool CPed::bNastyLimbsCheat; bool CPed::bNastyLimbsCheat;
bool CPed::bFannyMagnetCheat;
bool CPed::bPedCheat2; bool CPed::bPedCheat2;
bool CPed::bPedCheat3; bool CPed::bPedCheat3;
CVector2D CPed::ms_vec2DFleePosition; CVector2D CPed::ms_vec2DFleePosition;
@ -11673,6 +11674,11 @@ CPed::ProcessControl(void)
#ifndef VC_PED_PORTS #ifndef VC_PED_PORTS
m_pCurrentPhysSurface = nil; m_pCurrentPhysSurface = nil;
#endif #endif
if (bFannyMagnetCheat && m_nPedType == PEDTYPE_CIVFEMALE
&& m_pedStats->m_sexiness > 40 && !m_leader) {
SetLeader(FindPlayerPed());
}
} else { } else {
if (bIsStanding && (!m_pCurrentPhysSurface || IsPlayer()) if (bIsStanding && (!m_pCurrentPhysSurface || IsPlayer())
|| bIsInWater || !bUsesCollision) { || bIsInWater || !bUsesCollision) {

View File

@ -1076,6 +1076,7 @@ public:
static uint16 nEnterCarRangeMultiplier; static uint16 nEnterCarRangeMultiplier;
static bool bNastyLimbsCheat; static bool bNastyLimbsCheat;
static bool bFannyMagnetCheat;
static bool bPedCheat2; static bool bPedCheat2;
static bool bPedCheat3; static bool bPedCheat3;
static CVector2D ms_vec2DFleePosition; static CVector2D ms_vec2DFleePosition;

View File

@ -55,6 +55,7 @@ CBoat::CBoat(int mi, uint8 owner) : CVehicle(owner)
SetModelIndex(mi); SetModelIndex(mi);
pHandling = mod_HandlingManager.GetHandlingData((eHandlingId)minfo->m_handlingId); pHandling = mod_HandlingManager.GetHandlingData((eHandlingId)minfo->m_handlingId);
pFlyingHandling = mod_HandlingManager.GetFlyingPointer((eHandlingId)minfo->m_handlingId);
minfo->ChooseVehicleColour(m_currentColour1, m_currentColour2); minfo->ChooseVehicleColour(m_currentColour1, m_currentColour2);
m_fMass = pHandling->fMass; 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(); ProcessDelayedExplosion();
} }
@ -563,7 +586,7 @@ CBoat::ProcessControlInputs(uint8 pad)
m_fAccelerate += (CPad::GetPad(pad)->GetAccelerate()/255.0f - m_fAccelerate)*0.1f; m_fAccelerate += (CPad::GetPad(pad)->GetAccelerate()/255.0f - m_fAccelerate)*0.1f;
m_fAccelerate = clamp(m_fAccelerate, 0.0f, 1.0f); m_fAccelerate = clamp(m_fAccelerate, 0.0f, 1.0f);
}else }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 += (-CPad::GetPad(pad)->GetSteeringLeftRight()/128.0f - m_fSteeringLeftRight)*0.2f;
m_fSteeringLeftRight = clamp(m_fSteeringLeftRight, -1.0f, 1.0f); m_fSteeringLeftRight = clamp(m_fSteeringLeftRight, -1.0f, 1.0f);
@ -913,19 +936,34 @@ CBoat::AddWakePoint(CVector point)
{ {
int i; int i;
if (m_afWakePointLifeTime[0] > 0.0f) { if (m_afWakePointLifeTime[0] > 0.0f) {
if((CVector2D(GetPosition()) - m_avec2dWakePoints[0]).MagnitudeSqr() < SQR(1.0f)){ if ((CVector2D(GetPosition()) - m_avec2dWakePoints[0]).MagnitudeSqr() < SQR(2.0f)) {
for(i = Min(m_nNumWakePoints, ARRAY_SIZE(m_afWakePointLifeTime)-1); i != 0; i--){ 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_avec2dWakePoints[i] = m_avec2dWakePoints[i - 1];
m_afWakePointLifeTime[i] = m_afWakePointLifeTime[i - 1]; m_afWakePointLifeTime[i] = m_afWakePointLifeTime[i - 1];
} }
m_avec2dWakePoints[0] = point; m_avec2dWakePoints[0] = point;
m_afWakePointLifeTime[0] = 400.0f; m_afWakePointLifeTime[0] = 150.0f;
if (m_nNumWakePoints < ARRAY_SIZE(m_afWakePointLifeTime)) if (m_nNumWakePoints < ARRAY_SIZE(m_afWakePointLifeTime))
m_nNumWakePoints++; m_nNumWakePoints++;
} }
}else{ }
else {
m_avec2dWakePoints[0] = point; m_avec2dWakePoints[0] = point;
m_afWakePointLifeTime[0] = 400.0f; m_afWakePointLifeTime[0] = 150.0f;
m_nNumWakePoints = 1; m_nNumWakePoints = 1;
} }
} }

View File

@ -40,6 +40,7 @@ bool CVehicle::bAllDodosCheat;
bool CVehicle::bCheat3; bool CVehicle::bCheat3;
bool CVehicle::bCheat4; bool CVehicle::bCheat4;
bool CVehicle::bCheat5; bool CVehicle::bCheat5;
bool CVehicle::bCheat8;
#ifdef ALT_DODO_CHEAT #ifdef ALT_DODO_CHEAT
bool CVehicle::bAltDodoCheat; bool CVehicle::bAltDodoCheat;
#endif #endif

View File

@ -399,6 +399,7 @@ public:
static bool bCheat3; static bool bCheat3;
static bool bCheat4; static bool bCheat4;
static bool bCheat5; static bool bCheat5;
static bool bCheat8;
#ifdef ALT_DODO_CHEAT #ifdef ALT_DODO_CHEAT
static bool bAltDodoCheat; static bool bAltDodoCheat;
#endif #endif