mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-12-22 19:50:00 +00:00
m_nWantedLevel -> GetWantedLevel()
This commit is contained in:
parent
a511d79bf0
commit
497e0b801f
|
@ -161,7 +161,7 @@ cAudioManager::ServicePoliceRadio()
|
|||
if(CReplay::IsPlayingBack() || !FindPlayerPed() || !FindPlayerPed()->m_pWanted)
|
||||
return;
|
||||
#endif
|
||||
wantedLevel = FindPlayerPed()->m_pWanted->m_nWantedLevel;
|
||||
wantedLevel = FindPlayerPed()->m_pWanted->GetWantedLevel();
|
||||
if(!crimeReport) {
|
||||
if(wantedLevel != 0) {
|
||||
if(nLastSeen != 0) {
|
||||
|
@ -679,7 +679,7 @@ void
|
|||
cAudioManager::ReportCrime(eCrimeType type, const CVector &pos)
|
||||
{
|
||||
int32 lastCrime = ARRAY_SIZE(m_sPoliceRadioQueue.crimes);
|
||||
if (m_bIsInitialised && MusicManager.m_nMusicMode != MUSICMODE_CUTSCENE && FindPlayerPed()->m_pWanted->m_nWantedLevel > 0 &&
|
||||
if (m_bIsInitialised && MusicManager.m_nMusicMode != MUSICMODE_CUTSCENE && FindPlayerPed()->m_pWanted->GetWantedLevel() > 0 &&
|
||||
(type > CRIME_NONE || type < NUM_CRIME_TYPES) && m_FrameCounter >= gMinTimeToNextReport[type]) {
|
||||
for (int32 i = 0; i < ARRAY_SIZE(m_sPoliceRadioQueue.crimes); i++) {
|
||||
if (m_sPoliceRadioQueue.crimes[i].type) {
|
||||
|
|
|
@ -68,7 +68,7 @@ void CCarAI::UpdateCarAI(CVehicle* pVehicle)
|
|||
pVehicle->m_bSirenOrAlarm = true;
|
||||
}
|
||||
if (FindPlayerPed()->m_pWanted->m_bIgnoredByEveryone || pVehicle->bIsLawEnforcer &&
|
||||
(FindPlayerPed()->m_pWanted->m_nWantedLevel == 0 || FindPlayerPed()->m_pWanted->m_bIgnoredByCops || CCullZones::NoPolice())) {
|
||||
(FindPlayerPed()->m_pWanted->GetWantedLevel() == 0 || FindPlayerPed()->m_pWanted->m_bIgnoredByCops || CCullZones::NoPolice())) {
|
||||
CCarCtrl::JoinCarWithRoadSystem(pVehicle);
|
||||
pVehicle->AutoPilot.m_nCarMission = MISSION_CRUISE;
|
||||
pVehicle->AutoPilot.m_nDrivingStyle = DRIVINGSTYLE_STOP_FOR_CARS;
|
||||
|
@ -110,7 +110,7 @@ void CCarAI::UpdateCarAI(CVehicle* pVehicle)
|
|||
TellOccupantsToLeaveCar(pVehicle);
|
||||
pVehicle->AutoPilot.m_nCruiseSpeed = 0;
|
||||
pVehicle->AutoPilot.m_nCarMission = MISSION_NONE;
|
||||
if (FindPlayerPed()->m_pWanted->m_nWantedLevel <= 1)
|
||||
if (FindPlayerPed()->m_pWanted->GetWantedLevel() <= 1)
|
||||
pVehicle->m_bSirenOrAlarm = false;
|
||||
}
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ void CCarAI::UpdateCarAI(CVehicle* pVehicle)
|
|||
pVehicle->m_nCarHornTimer = 0;
|
||||
}
|
||||
if (FindPlayerPed()->m_pWanted->m_bIgnoredByEveryone || pVehicle->bIsLawEnforcer &&
|
||||
(FindPlayerPed()->m_pWanted->m_nWantedLevel == 0 || FindPlayerPed()->m_pWanted->m_bIgnoredByCops || CCullZones::NoPolice())){
|
||||
(FindPlayerPed()->m_pWanted->GetWantedLevel() == 0 || FindPlayerPed()->m_pWanted->m_bIgnoredByCops || CCullZones::NoPolice())){
|
||||
CCarCtrl::JoinCarWithRoadSystem(pVehicle);
|
||||
pVehicle->AutoPilot.m_nCarMission = MISSION_CRUISE;
|
||||
pVehicle->AutoPilot.m_nDrivingStyle = DRIVINGSTYLE_STOP_FOR_CARS;
|
||||
|
@ -141,7 +141,7 @@ void CCarAI::UpdateCarAI(CVehicle* pVehicle)
|
|||
pVehicle->m_bSirenOrAlarm = true;
|
||||
}
|
||||
if (FindPlayerPed()->m_pWanted->m_bIgnoredByEveryone || pVehicle->bIsLawEnforcer &&
|
||||
(FindPlayerPed()->m_pWanted->m_nWantedLevel == 0 || FindPlayerPed()->m_pWanted->m_bIgnoredByCops || CCullZones::NoPolice())) {
|
||||
(FindPlayerPed()->m_pWanted->GetWantedLevel() == 0 || FindPlayerPed()->m_pWanted->m_bIgnoredByCops || CCullZones::NoPolice())) {
|
||||
CCarCtrl::JoinCarWithRoadSystem(pVehicle);
|
||||
pVehicle->AutoPilot.m_nCarMission = MISSION_CRUISE;
|
||||
pVehicle->AutoPilot.m_nDrivingStyle = DRIVINGSTYLE_STOP_FOR_CARS;
|
||||
|
@ -169,7 +169,7 @@ void CCarAI::UpdateCarAI(CVehicle* pVehicle)
|
|||
TellOccupantsToLeaveCar(pVehicle);
|
||||
pVehicle->AutoPilot.m_nCruiseSpeed = 0;
|
||||
pVehicle->AutoPilot.m_nCarMission = MISSION_NONE;
|
||||
if (FindPlayerPed()->m_pWanted->m_nWantedLevel <= 1)
|
||||
if (FindPlayerPed()->m_pWanted->GetWantedLevel() <= 1)
|
||||
pVehicle->m_bSirenOrAlarm = false;
|
||||
}
|
||||
}
|
||||
|
@ -179,7 +179,7 @@ void CCarAI::UpdateCarAI(CVehicle* pVehicle)
|
|||
pVehicle->m_nCarHornTimer = 0;
|
||||
}
|
||||
if (FindPlayerPed()->m_pWanted->m_bIgnoredByEveryone || pVehicle->bIsLawEnforcer &&
|
||||
(FindPlayerPed()->m_pWanted->m_nWantedLevel == 0 || FindPlayerPed()->m_pWanted->m_bIgnoredByCops || CCullZones::NoPolice())) {
|
||||
(FindPlayerPed()->m_pWanted->GetWantedLevel() == 0 || FindPlayerPed()->m_pWanted->m_bIgnoredByCops || CCullZones::NoPolice())) {
|
||||
CCarCtrl::JoinCarWithRoadSystem(pVehicle);
|
||||
pVehicle->AutoPilot.m_nCarMission = MISSION_CRUISE;
|
||||
pVehicle->AutoPilot.m_nDrivingStyle = DRIVINGSTYLE_STOP_FOR_CARS;
|
||||
|
@ -283,7 +283,7 @@ void CCarAI::UpdateCarAI(CVehicle* pVehicle)
|
|||
(FindPlayerVehicle() == pVehicle->AutoPilot.m_pTargetCar &&
|
||||
#endif
|
||||
(FindPlayerPed()->m_pWanted->m_bIgnoredByEveryone || pVehicle->bIsLawEnforcer &&
|
||||
(FindPlayerPed()->m_pWanted->m_nWantedLevel == 0 || FindPlayerPed()->m_pWanted->m_bIgnoredByCops || CCullZones::NoPolice()))
|
||||
(FindPlayerPed()->m_pWanted->GetWantedLevel() == 0 || FindPlayerPed()->m_pWanted->m_bIgnoredByCops || CCullZones::NoPolice()))
|
||||
#ifdef FIX_BUGS
|
||||
)
|
||||
#endif
|
||||
|
@ -337,7 +337,7 @@ void CCarAI::UpdateCarAI(CVehicle* pVehicle)
|
|||
}
|
||||
break;
|
||||
default:
|
||||
if (pVehicle->bIsLawEnforcer && FindPlayerPed()->m_pWanted->m_nWantedLevel > 0 && !CCullZones::NoPolice()){
|
||||
if (pVehicle->bIsLawEnforcer && FindPlayerPed()->m_pWanted->GetWantedLevel() > 0 && !CCullZones::NoPolice()){
|
||||
if (ABS(FindPlayerCoors().x - pVehicle->GetPosition().x) > 10.0f ||
|
||||
ABS(FindPlayerCoors().y - pVehicle->GetPosition().y) > 10.0f){
|
||||
pVehicle->AutoPilot.m_nCruiseSpeed = FindPoliceCarSpeedForWantedLevel(pVehicle);
|
||||
|
@ -351,7 +351,7 @@ void CCarAI::UpdateCarAI(CVehicle* pVehicle)
|
|||
TellOccupantsToLeaveCar(pVehicle);
|
||||
pVehicle->AutoPilot.m_nCruiseSpeed = 0;
|
||||
pVehicle->AutoPilot.m_nCarMission = MISSION_NONE;
|
||||
if (FindPlayerPed()->m_pWanted->m_nWantedLevel <= 1)
|
||||
if (FindPlayerPed()->m_pWanted->GetWantedLevel() <= 1)
|
||||
pVehicle->m_bSirenOrAlarm = false;
|
||||
}
|
||||
}
|
||||
|
@ -486,7 +486,7 @@ void CCarAI::AddPoliceCarOccupants(CVehicle* pVehicle)
|
|||
case MI_RHINO:
|
||||
case MI_BARRACKS:
|
||||
pVehicle->SetUpDriver();
|
||||
if (FindPlayerPed()->m_pWanted->m_nWantedLevel > 1)
|
||||
if (FindPlayerPed()->m_pWanted->GetWantedLevel() > 1)
|
||||
pVehicle->SetupPassenger(0);
|
||||
return;
|
||||
default:
|
||||
|
@ -541,7 +541,7 @@ void CCarAI::TellCarToBlockOtherCar(CVehicle* pVehicle, CVehicle* pTarget)
|
|||
|
||||
uint8 CCarAI::FindPoliceCarMissionForWantedLevel()
|
||||
{
|
||||
switch (CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_pWanted->m_nWantedLevel){
|
||||
switch (CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_pWanted->GetWantedLevel()){
|
||||
case 0:
|
||||
case 1: return MISSION_BLOCKPLAYER_FARAWAY;
|
||||
case 2: return (CGeneral::GetRandomNumber() & 3) >= 3 ? MISSION_RAMPLAYER_FARAWAY : MISSION_BLOCKPLAYER_FARAWAY;
|
||||
|
@ -555,7 +555,7 @@ uint8 CCarAI::FindPoliceCarMissionForWantedLevel()
|
|||
|
||||
int32 CCarAI::FindPoliceCarSpeedForWantedLevel(CVehicle* pVehicle)
|
||||
{
|
||||
switch (CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_pWanted->m_nWantedLevel) {
|
||||
switch (CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_pWanted->GetWantedLevel()) {
|
||||
case 0: return CGeneral::GetRandomNumberInRange(12, 16);
|
||||
case 1: return 25;
|
||||
case 2: return 34;
|
||||
|
@ -569,7 +569,7 @@ int32 CCarAI::FindPoliceCarSpeedForWantedLevel(CVehicle* pVehicle)
|
|||
|
||||
void CCarAI::MellowOutChaseSpeed(CVehicle* pVehicle)
|
||||
{
|
||||
if (CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_pWanted->m_nWantedLevel == 1){
|
||||
if (CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_pWanted->GetWantedLevel() == 1){
|
||||
float distanceToPlayer = (pVehicle->GetPosition() - FindPlayerCoors()).Magnitude();
|
||||
if (FindPlayerVehicle()){
|
||||
if (distanceToPlayer < 10.0f)
|
||||
|
@ -586,7 +586,7 @@ void CCarAI::MellowOutChaseSpeed(CVehicle* pVehicle)
|
|||
else
|
||||
pVehicle->AutoPilot.m_nCruiseSpeed = 25;
|
||||
}
|
||||
}else if (CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_pWanted->m_nWantedLevel == 2){
|
||||
}else if (CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_pWanted->GetWantedLevel() == 2){
|
||||
float distanceToPlayer = (pVehicle->GetPosition() - FindPlayerCoors()).Magnitude();
|
||||
if (FindPlayerVehicle()) {
|
||||
if (distanceToPlayer < 10.0f)
|
||||
|
|
|
@ -124,18 +124,18 @@ CCarCtrl::GenerateOneRandomCar()
|
|||
CWanted* pWanted = pPlayer->m_pPed->m_pWanted;
|
||||
int carClass;
|
||||
int carModel;
|
||||
if (pWanted->m_nWantedLevel > 1 && NumLawEnforcerCars < pWanted->m_MaximumLawEnforcerVehicles &&
|
||||
if (pWanted->GetWantedLevel() > 1 && NumLawEnforcerCars < pWanted->m_MaximumLawEnforcerVehicles &&
|
||||
pWanted->m_CurrentCops < pWanted->m_MaxCops && (
|
||||
pWanted->m_nWantedLevel > 3 ||
|
||||
pWanted->m_nWantedLevel > 2 && CTimer::GetTimeInMilliseconds() > LastTimeLawEnforcerCreated + 5000 ||
|
||||
pWanted->m_nWantedLevel > 1 && CTimer::GetTimeInMilliseconds() > LastTimeLawEnforcerCreated + 8000)) {
|
||||
/* Last pWanted->m_nWantedLevel > 1 is unnecessary but I added it for better readability. */
|
||||
pWanted->GetWantedLevel() > 3 ||
|
||||
pWanted->GetWantedLevel() > 2 && CTimer::GetTimeInMilliseconds() > LastTimeLawEnforcerCreated + 5000 ||
|
||||
pWanted->GetWantedLevel() > 1 && CTimer::GetTimeInMilliseconds() > LastTimeLawEnforcerCreated + 8000)) {
|
||||
/* Last pWanted->GetWantedLevel() > 1 is unnecessary but I added it for better readability. */
|
||||
/* Wouldn't be surprised it was there originally but was optimized out. */
|
||||
carClass = COPS;
|
||||
carModel = ChoosePoliceCarModel();
|
||||
}else{
|
||||
carModel = ChooseModel(&zone, &vecTargetPos, &carClass);
|
||||
if (carClass == COPS && pWanted->m_nWantedLevel >= 1)
|
||||
if (carClass == COPS && pWanted->GetWantedLevel() >= 1)
|
||||
/* All cop spawns with wanted level are handled by condition above. */
|
||||
/* In particular it means that cop cars never spawn if player has wanted level of 1. */
|
||||
return;
|
||||
|
@ -267,7 +267,7 @@ CCarCtrl::GenerateOneRandomCar()
|
|||
}
|
||||
if (!ThePaths.NewGenerateCarCreationCoors(vecTargetPos.x, vecTargetPos.y, frontX, frontY,
|
||||
preferredDistance, angleLimit, invertAngleLimitTest, &spawnPosition, &curNodeId, &nextNodeId,
|
||||
&positionBetweenNodes, carClass == COPS && pWanted->m_nWantedLevel >= 1))
|
||||
&positionBetweenNodes, carClass == COPS && pWanted->GetWantedLevel() >= 1))
|
||||
return;
|
||||
int16 colliding;
|
||||
CWorld::FindObjectsKindaColliding(spawnPosition, 10.0f, true, &colliding, 2, nil, false, true, true, false, false);
|
||||
|
@ -331,7 +331,7 @@ CCarCtrl::GenerateOneRandomCar()
|
|||
}
|
||||
case COPS:
|
||||
pVehicle->AutoPilot.m_nTempAction = TEMPACT_NONE;
|
||||
if (CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_pWanted->m_nWantedLevel != 0){
|
||||
if (CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_pWanted->GetWantedLevel() != 0){
|
||||
pVehicle->AutoPilot.m_nCruiseSpeed = CCarAI::FindPoliceCarSpeedForWantedLevel(pVehicle);
|
||||
pVehicle->AutoPilot.m_fMaxTrafficSpeed = pVehicle->AutoPilot.m_nCruiseSpeed / 2;
|
||||
pVehicle->AutoPilot.m_nCarMission = CCarAI::FindPoliceCarMissionForWantedLevel();
|
||||
|
@ -2654,7 +2654,7 @@ void CCarCtrl::FindLinksToGoWithTheseNodes(CVehicle* pVehicle)
|
|||
|
||||
void CCarCtrl::GenerateEmergencyServicesCar(void)
|
||||
{
|
||||
if (FindPlayerPed()->m_pWanted->m_nWantedLevel > 3)
|
||||
if (FindPlayerPed()->m_pWanted->GetWantedLevel() > 3)
|
||||
return;
|
||||
if (NumFiretrucksOnDuty + NumAmbulancesOnDuty + NumParkedCars + NumMissionCars +
|
||||
NumLawEnforcerCars + NumRandomCars > MaxNumberOfCarsInUse)
|
||||
|
|
|
@ -159,7 +159,7 @@ CGameLogic::Update()
|
|||
pPlayerInfo.m_WBState = WBSTATE_PLAYING;
|
||||
int takeMoney;
|
||||
|
||||
switch (pPlayerInfo.m_pPed->m_pWanted->m_nWantedLevel) {
|
||||
switch (pPlayerInfo.m_pPed->m_pWanted->GetWantedLevel()) {
|
||||
case 0:
|
||||
case 1:
|
||||
takeMoney = 100;
|
||||
|
|
|
@ -387,7 +387,7 @@ void CGarage::Update()
|
|||
m_eGarageState = GS_OPENING;
|
||||
DMAudio.PlayFrontEndSound(SOUND_GARAGE_OPENING, 1);
|
||||
bool bTakeMoney = false;
|
||||
if (FindPlayerPed()->m_pWanted->m_nWantedLevel != 0)
|
||||
if (FindPlayerPed()->m_pWanted->GetWantedLevel() != 0)
|
||||
bTakeMoney = true;
|
||||
FindPlayerPed()->m_pWanted->Reset();
|
||||
CPad::GetPad(0)->SetEnablePlayerControls(PLAYERCONTROL_GARAGE);
|
||||
|
|
|
@ -129,7 +129,7 @@ CPickup::CanBePickedUp(CPlayerPed *player)
|
|||
bool cannotBePickedUp =
|
||||
(m_pObject->GetModelIndex() == MI_PICKUP_BODYARMOUR && player->m_fArmour > 99.5f)
|
||||
|| (m_pObject->GetModelIndex() == MI_PICKUP_HEALTH && player->m_fHealth > 99.5f)
|
||||
|| (m_pObject->GetModelIndex() == MI_PICKUP_BRIBE && player->m_pWanted->m_nWantedLevel == 0)
|
||||
|| (m_pObject->GetModelIndex() == MI_PICKUP_BRIBE && player->m_pWanted->GetWantedLevel() == 0)
|
||||
|| (m_pObject->GetModelIndex() == MI_PICKUP_KILLFRENZY && (CTheScripts::IsPlayerOnAMission() || CDarkel::FrenzyOnGoing() || !CGame::nastyGame));
|
||||
return !cannotBePickedUp;
|
||||
}
|
||||
|
@ -456,7 +456,7 @@ CPickups::GivePlayerGoodiesWithPickUpMI(int16 modelIndex, int playerIndex)
|
|||
DMAudio.PlayFrontEndSound(SOUND_PICKUP_BONUS, 0);
|
||||
return true;
|
||||
} else if (modelIndex == MI_PICKUP_BRIBE) {
|
||||
int32 level = FindPlayerPed()->m_pWanted->m_nWantedLevel - 1;
|
||||
int32 level = FindPlayerPed()->m_pWanted->GetWantedLevel() - 1;
|
||||
if (level < 0) level = 0;
|
||||
player->SetWantedLevel(level);
|
||||
DMAudio.PlayFrontEndSound(SOUND_PICKUP_BONUS, 0);
|
||||
|
|
|
@ -4083,7 +4083,7 @@ int8 CRunningScript::ProcessCommands200To299(int32 command)
|
|||
return 0;
|
||||
case COMMAND_IS_WANTED_LEVEL_GREATER:
|
||||
CollectParameters(&m_nIp, 2);
|
||||
UpdateCompareFlag(CWorld::Players[ScriptParams[0]].m_pPed->m_pWanted->m_nWantedLevel > ScriptParams[1]);
|
||||
UpdateCompareFlag(CWorld::Players[ScriptParams[0]].m_pPed->m_pWanted->GetWantedLevel() > ScriptParams[1]);
|
||||
return 0;
|
||||
case COMMAND_CLEAR_WANTED_LEVEL:
|
||||
CollectParameters(&m_nIp, 1);
|
||||
|
|
|
@ -1033,7 +1033,7 @@ int8 CRunningScript::ProcessCommands400To499(int32 command)
|
|||
CollectParameters(&m_nIp, 1);
|
||||
CPlayerPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed;
|
||||
script_assert(pPed);
|
||||
ScriptParams[0] = pPed->m_pWanted->m_nWantedLevel;
|
||||
ScriptParams[0] = pPed->m_pWanted->GetWantedLevel();
|
||||
StoreParameters(&m_nIp, 1);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -2783,7 +2783,7 @@ CCamera::TryToStartNewCamMode(int obbeMode)
|
|||
if (CReplay::IsPlayingBack())
|
||||
return false;
|
||||
#endif
|
||||
if(FindPlayerPed()->m_pWanted->m_nWantedLevel < 1)
|
||||
if(FindPlayerPed()->m_pWanted->GetWantedLevel() < 1)
|
||||
return false;
|
||||
if(FindPlayerVehicle() == nil)
|
||||
return false;
|
||||
|
@ -2811,7 +2811,7 @@ CCamera::TryToStartNewCamMode(int obbeMode)
|
|||
if (CReplay::IsPlayingBack())
|
||||
return false;
|
||||
#endif
|
||||
if(FindPlayerPed()->m_pWanted->m_nWantedLevel < 1)
|
||||
if(FindPlayerPed()->m_pWanted->GetWantedLevel() < 1)
|
||||
return false;
|
||||
if(FindPlayerVehicle() == nil)
|
||||
return false;
|
||||
|
|
|
@ -226,7 +226,7 @@ void ArmourCheat()
|
|||
void WantedLevelUpCheat()
|
||||
{
|
||||
CHud::SetHelpMessage(TheText.Get("CHEAT5"), true);
|
||||
FindPlayerPed()->SetWantedLevel(Min(FindPlayerPed()->m_pWanted->m_nWantedLevel + 2, 6));
|
||||
FindPlayerPed()->SetWantedLevel(Min(FindPlayerPed()->m_pWanted->GetWantedLevel() + 2, 6));
|
||||
}
|
||||
|
||||
void WantedLevelDownCheat()
|
||||
|
|
|
@ -37,6 +37,7 @@ public:
|
|||
int32 NumOfHelisRequired();
|
||||
void SetWantedLevel(int32);
|
||||
void SetWantedLevelNoDrop(int32 level);
|
||||
int32 GetWantedLevel() { return m_nWantedLevel; }
|
||||
void RegisterCrime(eCrimeType type, const CVector &coors, uint32 id, bool policeDoesntCare);
|
||||
void RegisterCrime_Immediately(eCrimeType type, const CVector &coors, uint32 id, bool policeDoesntCare);
|
||||
void ClearQdCrimes();
|
||||
|
|
|
@ -179,7 +179,7 @@ CCopPed::ClearPursuit(void)
|
|||
m_bZoneDisabled = false;
|
||||
ClearObjective();
|
||||
if (IsPedInControl()) {
|
||||
if (!m_pMyVehicle || wanted->m_nWantedLevel != 0) {
|
||||
if (!m_pMyVehicle || wanted->GetWantedLevel() != 0) {
|
||||
if (m_pMyVehicle && (m_pMyVehicle->GetPosition() - GetPosition()).MagnitudeSqr() < sq(5.0f)) {
|
||||
m_nLastPedState = PED_IDLE;
|
||||
SetSeek((CEntity*)m_pMyVehicle, 2.5f);
|
||||
|
@ -275,7 +275,7 @@ CCopPed::ScanForCrimes(void)
|
|||
if (!m_bIsInPursuit) {
|
||||
CPlayerPed *player = FindPlayerPed();
|
||||
if ((m_objective == OBJECTIVE_ENTER_CAR_AS_DRIVER || m_objective == OBJECTIVE_ENTER_CAR_AS_PASSENGER)
|
||||
&& player->m_pWanted->m_nWantedLevel == 0) {
|
||||
&& player->m_pWanted->GetWantedLevel() == 0) {
|
||||
|
||||
if (player->m_pMyVehicle
|
||||
#ifdef FIX_BUGS
|
||||
|
@ -291,7 +291,7 @@ void
|
|||
CCopPed::CopAI(void)
|
||||
{
|
||||
CWanted *wanted = FindPlayerPed()->m_pWanted;
|
||||
int wantedLevel = wanted->m_nWantedLevel;
|
||||
int wantedLevel = wanted->GetWantedLevel();
|
||||
CPhysical *playerOrHisVeh = FindPlayerVehicle() ? (CPhysical*)FindPlayerVehicle() : (CPhysical*)FindPlayerPed();
|
||||
|
||||
if (wanted->m_bIgnoredByEveryone || wanted->m_bIgnoredByCops) {
|
||||
|
|
|
@ -832,7 +832,7 @@ CPed::ProcessObjective(void)
|
|||
m_pMyVehicle->SetStatus(STATUS_PHYSICS);
|
||||
m_pMyVehicle->AutoPilot.m_nPrevRouteNode = 0;
|
||||
if (m_nPedType == PEDTYPE_COP) {
|
||||
m_pMyVehicle->AutoPilot.m_nCruiseSpeed = (FindPlayerPed()->m_pWanted->m_nWantedLevel * 0.1f + 0.6f) * (GAME_SPEED_TO_CARAI_SPEED * m_pMyVehicle->pHandling->Transmission.fMaxCruiseVelocity);
|
||||
m_pMyVehicle->AutoPilot.m_nCruiseSpeed = (FindPlayerPed()->m_pWanted->GetWantedLevel() * 0.1f + 0.6f) * (GAME_SPEED_TO_CARAI_SPEED * m_pMyVehicle->pHandling->Transmission.fMaxCruiseVelocity);
|
||||
m_pMyVehicle->AutoPilot.m_nCarMission = CCarAI::FindPoliceCarMissionForWantedLevel();
|
||||
} else {
|
||||
m_pMyVehicle->AutoPilot.m_nCruiseSpeed = GAME_SPEED_TO_CARAI_SPEED * m_pMyVehicle->pHandling->Transmission.fMaxCruiseVelocity * 0.8f;
|
||||
|
|
|
@ -582,7 +582,7 @@ CPopulation::AddToPopulation(float minDist, float maxDist, float minDistOffScree
|
|||
CVector playerCentreOfWorld = FindPlayerCentreOfWorld(CWorld::PlayerInFocus);
|
||||
CTheZones::GetZoneInfoForTimeOfDay(&playerCentreOfWorld, &zoneInfo);
|
||||
CWanted *wantedInfo = playerInfo->m_pPed->m_pWanted;
|
||||
if (wantedInfo->m_nWantedLevel > 2) {
|
||||
if (wantedInfo->GetWantedLevel() > 2) {
|
||||
if (ms_nNumCop < wantedInfo->m_MaxCops && !playerInfo->m_pPed->bInVehicle
|
||||
&& (CCarCtrl::NumLawEnforcerCars >= wantedInfo->m_MaximumLawEnforcerVehicles
|
||||
|| CCarCtrl::NumRandomCars >= playerInfo->m_nTrafficMultiplier * CCarCtrl::CarDensityMultiplier
|
||||
|
|
|
@ -655,7 +655,7 @@ void CHud::Draw()
|
|||
CFont::SetColor(CRGBA(0, 0, 0, 255));
|
||||
CFont::PrintString(fStarsX + SCREEN_SCALE_X_FIX(2.0f), SCREEN_SCALE_Y(87.0f) + SCREEN_SCALE_Y_FIX(2.0f), sPrintIcon);
|
||||
|
||||
if (FindPlayerPed()->m_pWanted->m_nWantedLevel > i
|
||||
if (FindPlayerPed()->m_pWanted->GetWantedLevel() > i
|
||||
&& (CTimer::GetTimeInMilliseconds() > FindPlayerPed()->m_pWanted->m_nLastWantedLevelChange
|
||||
+ 2000 || CTimer::GetFrameCounter() & 4)) {
|
||||
|
||||
|
|
|
@ -240,7 +240,7 @@ CAutomobile::ProcessControl(void)
|
|||
// Improve grip of vehicles in certain cases
|
||||
bool strongGrip1 = false;
|
||||
bool strongGrip2 = false;
|
||||
if(FindPlayerVehicle() && this != FindPlayerVehicle() && FindPlayerPed()->m_pWanted->m_nWantedLevel > 3 &&
|
||||
if(FindPlayerVehicle() && this != FindPlayerVehicle() && FindPlayerPed()->m_pWanted->GetWantedLevel() > 3 &&
|
||||
(AutoPilot.m_nCarMission == MISSION_RAMPLAYER_FARAWAY || AutoPilot.m_nCarMission == MISSION_RAMPLAYER_CLOSE ||
|
||||
AutoPilot.m_nCarMission == MISSION_BLOCKPLAYER_FARAWAY || AutoPilot.m_nCarMission == MISSION_BLOCKPLAYER_CLOSE) &&
|
||||
FindPlayerSpeed().Magnitude() > 0.3f){
|
||||
|
|
|
@ -474,7 +474,7 @@ CHeli::ProcessControl(void)
|
|||
// Shoot
|
||||
int shootTimeout;
|
||||
if (m_heliType == HELI_TYPE_RANDOM) {
|
||||
switch (FindPlayerPed()->m_pWanted->m_nWantedLevel) {
|
||||
switch (FindPlayerPed()->m_pWanted->GetWantedLevel()) {
|
||||
case 0:
|
||||
case 1:
|
||||
case 2: shootTimeout = 999999; break;
|
||||
|
|
Loading…
Reference in a new issue