1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-23 08:00:01 +00:00

Merge pull request #974 from withmorten/miami-wantedlevel

m_nWantedLevel -> GetWantedLevel()
This commit is contained in:
aap 2021-01-22 10:33:55 +01:00 committed by GitHub
commit 4acc9b08a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 77 additions and 77 deletions

View file

@ -305,11 +305,11 @@ cAudioManager::ProcessPlayerMood()
playerPed = FindPlayerPed(); playerPed = FindPlayerPed();
if (playerPed != nil) { if (playerPed != nil) {
if (playerPed->m_pWanted->m_nWantedLevel > 3) { if (playerPed->m_pWanted->GetWantedLevel() > 3) {
m_nPlayerMood = PLAYER_MOOD_ANGRY; m_nPlayerMood = PLAYER_MOOD_ANGRY;
return; return;
} }
if (playerPed->m_pWanted->m_nWantedLevel > 1) { if (playerPed->m_pWanted->GetWantedLevel() > 1) {
m_nPlayerMood = PLAYER_MOOD_PISSED_OFF; m_nPlayerMood = PLAYER_MOOD_PISSED_OFF;
return; return;
} }
@ -5678,7 +5678,7 @@ cAudioManager::GetCopTalkSfx(CPed *ped, int16 sound)
case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 8494, 4); break; case SOUND_PED_ATTACK: GetPhrase(sfx, ped->m_lastComment, 8494, 4); break;
case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 8491, 3); break; case SOUND_PED_EVADE: GetPhrase(sfx, ped->m_lastComment, 8491, 3); break;
case SOUND_PED_PED_COLLISION: case SOUND_PED_PED_COLLISION:
if(FindPlayerPed()->m_pWanted->m_nWantedLevel <= 0) return NO_SAMPLE; if(FindPlayerPed()->m_pWanted->GetWantedLevel() <= 0) return NO_SAMPLE;
GetPhrase(sfx, ped->m_lastComment, 8476, 5); GetPhrase(sfx, ped->m_lastComment, 8476, 5);
break; break;
default: return GetGenericMaleTalkSfx(ped, sound); default: return GetGenericMaleTalkSfx(ped, sound);

View file

@ -136,7 +136,7 @@ cAudioManager::ServicePoliceRadio()
#endif #endif
CPlayerPed *playerPed = FindPlayerPed(); CPlayerPed *playerPed = FindPlayerPed();
if (playerPed) { if (playerPed) {
wantedLevel = playerPed->m_pWanted->m_nWantedLevel; wantedLevel = playerPed->m_pWanted->GetWantedLevel();
if (!crimeReport) { if (!crimeReport) {
if (wantedLevel != 0) { if (wantedLevel != 0) {
if (nLastSeen != 0) if (nLastSeen != 0)
@ -653,7 +653,7 @@ void
cAudioManager::ReportCrime(eCrimeType type, const CVector &pos) cAudioManager::ReportCrime(eCrimeType type, const CVector &pos)
{ {
int32 lastCrime = ARRAY_SIZE(m_sPoliceRadioQueue.crimes); 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]) { (type > CRIME_NONE || type < NUM_CRIME_TYPES) && m_FrameCounter >= gMinTimeToNextReport[type]) {
for (int32 i = 0; i < ARRAY_SIZE(m_sPoliceRadioQueue.crimes); i++) { for (int32 i = 0; i < ARRAY_SIZE(m_sPoliceRadioQueue.crimes); i++) {
if (m_sPoliceRadioQueue.crimes[i].type != CRIME_NONE) { if (m_sPoliceRadioQueue.crimes[i].type != CRIME_NONE) {

View file

@ -44,7 +44,7 @@ float CCarAI::FindSwitchDistanceFar(CVehicle* pVehicle)
void CCarAI::BackToCruisingIfNoWantedLevel(CVehicle* pVehicle) void CCarAI::BackToCruisingIfNoWantedLevel(CVehicle* pVehicle)
{ {
if (FindPlayerPed()->m_pWanted->m_bIgnoredByEveryone || pVehicle->bIsLawEnforcer && 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); CCarCtrl::JoinCarWithRoadSystem(pVehicle);
pVehicle->AutoPilot.m_nCarMission = MISSION_CRUISE; pVehicle->AutoPilot.m_nCarMission = MISSION_CRUISE;
pVehicle->AutoPilot.m_nDrivingStyle = DRIVINGSTYLE_STOP_FOR_CARS; pVehicle->AutoPilot.m_nDrivingStyle = DRIVINGSTYLE_STOP_FOR_CARS;
@ -118,7 +118,7 @@ void CCarAI::UpdateCarAI(CVehicle* pVehicle)
TellOccupantsToLeaveCar(pVehicle); TellOccupantsToLeaveCar(pVehicle);
pVehicle->AutoPilot.m_nCruiseSpeed = 0; pVehicle->AutoPilot.m_nCruiseSpeed = 0;
pVehicle->AutoPilot.m_nCarMission = MISSION_NONE; pVehicle->AutoPilot.m_nCarMission = MISSION_NONE;
if (FindPlayerPed()->m_pWanted->m_nWantedLevel <= 1) if (FindPlayerPed()->m_pWanted->GetWantedLevel() <= 1)
pVehicle->m_bSirenOrAlarm = false; pVehicle->m_bSirenOrAlarm = false;
} }
} }
@ -160,7 +160,7 @@ void CCarAI::UpdateCarAI(CVehicle* pVehicle)
TellOccupantsToLeaveCar(pVehicle); TellOccupantsToLeaveCar(pVehicle);
pVehicle->AutoPilot.m_nCruiseSpeed = 0; pVehicle->AutoPilot.m_nCruiseSpeed = 0;
pVehicle->AutoPilot.m_nCarMission = MISSION_NONE; pVehicle->AutoPilot.m_nCarMission = MISSION_NONE;
if (FindPlayerPed()->m_pWanted->m_nWantedLevel <= 1) if (FindPlayerPed()->m_pWanted->GetWantedLevel() <= 1)
pVehicle->m_bSirenOrAlarm = false; pVehicle->m_bSirenOrAlarm = false;
} }
} }
@ -333,7 +333,7 @@ void CCarAI::UpdateCarAI(CVehicle* pVehicle)
pVehicle->AutoPilot.m_nCarMission = MISSION_STOP_FOREVER; pVehicle->AutoPilot.m_nCarMission = MISSION_STOP_FOREVER;
} }
if (distance > 70.0f || FindPlayerPed()->m_pWanted->m_bIgnoredByEveryone || if (distance > 70.0f || FindPlayerPed()->m_pWanted->m_bIgnoredByEveryone ||
(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())) {
TellOccupantsToLeaveCar(pVehicle); TellOccupantsToLeaveCar(pVehicle);
pVehicle->AutoPilot.m_nCruiseSpeed = 0; pVehicle->AutoPilot.m_nCruiseSpeed = 0;
pVehicle->AutoPilot.m_nCarMission = MISSION_STOP_FOREVER; pVehicle->AutoPilot.m_nCarMission = MISSION_STOP_FOREVER;
@ -350,7 +350,7 @@ void CCarAI::UpdateCarAI(CVehicle* pVehicle)
break; break;
} }
default: 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 || if (ABS(FindPlayerCoors().x - pVehicle->GetPosition().x) > 10.0f ||
ABS(FindPlayerCoors().y - pVehicle->GetPosition().y) > 10.0f){ ABS(FindPlayerCoors().y - pVehicle->GetPosition().y) > 10.0f){
pVehicle->AutoPilot.m_nCruiseSpeed = FindPoliceCarSpeedForWantedLevel(pVehicle); pVehicle->AutoPilot.m_nCruiseSpeed = FindPoliceCarSpeedForWantedLevel(pVehicle);
@ -364,7 +364,7 @@ void CCarAI::UpdateCarAI(CVehicle* pVehicle)
TellOccupantsToLeaveCar(pVehicle); TellOccupantsToLeaveCar(pVehicle);
pVehicle->AutoPilot.m_nCruiseSpeed = 0; pVehicle->AutoPilot.m_nCruiseSpeed = 0;
pVehicle->AutoPilot.m_nCarMission = MISSION_NONE; pVehicle->AutoPilot.m_nCarMission = MISSION_NONE;
if (FindPlayerPed()->m_pWanted->m_nWantedLevel <= 1) if (FindPlayerPed()->m_pWanted->GetWantedLevel() <= 1)
pVehicle->m_bSirenOrAlarm = false; pVehicle->m_bSirenOrAlarm = false;
} }
} }
@ -377,7 +377,7 @@ void CCarAI::UpdateCarAI(CVehicle* pVehicle)
pVehicle->AutoPilot.m_nCruiseSpeed = 0; pVehicle->AutoPilot.m_nCruiseSpeed = 0;
break; break;
} }
if (pVehicle->bIsLawEnforcer && FindPlayerPed()->m_pWanted->m_nWantedLevel >= 1 && CCullZones::PoliceAbandonCars()) { if (pVehicle->bIsLawEnforcer && FindPlayerPed()->m_pWanted->GetWantedLevel() >= 1 && CCullZones::PoliceAbandonCars()) {
TellOccupantsToLeaveCar(pVehicle); TellOccupantsToLeaveCar(pVehicle);
pVehicle->AutoPilot.m_nCruiseSpeed = 0; pVehicle->AutoPilot.m_nCruiseSpeed = 0;
pVehicle->AutoPilot.m_nCarMission = MISSION_NONE; pVehicle->AutoPilot.m_nCarMission = MISSION_NONE;
@ -485,7 +485,7 @@ void CCarAI::UpdateCarAI(CVehicle* pVehicle)
else else
pVehicle->AutoPilot.m_fCruiseSpeedMultiplier += change; pVehicle->AutoPilot.m_fCruiseSpeedMultiplier += change;
if (pVehicle->bIsLawEnforcer && FindPlayerPed()->m_pWanted->m_nWantedLevel > 0) { if (pVehicle->bIsLawEnforcer && FindPlayerPed()->m_pWanted->GetWantedLevel() > 0) {
if (!FindPlayerVehicle() || if (!FindPlayerVehicle() ||
FindPlayerVehicle()->GetVehicleAppearance() == VEHICLE_APPEARANCE_CAR || FindPlayerVehicle()->GetVehicleAppearance() == VEHICLE_APPEARANCE_CAR ||
FindPlayerVehicle()->GetVehicleAppearance() == VEHICLE_APPEARANCE_BIKE) { FindPlayerVehicle()->GetVehicleAppearance() == VEHICLE_APPEARANCE_BIKE) {
@ -550,7 +550,7 @@ void CCarAI::AddPoliceCarOccupants(CVehicle* pVehicle)
case MI_RHINO: case MI_RHINO:
case MI_BARRACKS: case MI_BARRACKS:
pVehicle->SetUpDriver(); pVehicle->SetUpDriver();
if (FindPlayerPed()->m_pWanted->m_nWantedLevel > 1) if (FindPlayerPed()->m_pWanted->GetWantedLevel() > 1)
pVehicle->SetupPassenger(0); pVehicle->SetupPassenger(0);
return; return;
case MI_PREDATOR: case MI_PREDATOR:
@ -636,7 +636,7 @@ void CCarAI::TellCarToBlockOtherCar(CVehicle* pVehicle, CVehicle* pTarget)
uint8 CCarAI::FindPoliceCarMissionForWantedLevel() 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 0:
case 1: return MISSION_BLOCKPLAYER_FARAWAY; case 1: return MISSION_BLOCKPLAYER_FARAWAY;
case 2: return (CGeneral::GetRandomNumber() & 3) >= 3 ? MISSION_RAMPLAYER_FARAWAY : MISSION_BLOCKPLAYER_FARAWAY; case 2: return (CGeneral::GetRandomNumber() & 3) >= 3 ? MISSION_RAMPLAYER_FARAWAY : MISSION_BLOCKPLAYER_FARAWAY;
@ -650,7 +650,7 @@ uint8 CCarAI::FindPoliceCarMissionForWantedLevel()
uint8 CCarAI::FindPoliceBoatMissionForWantedLevel() uint8 CCarAI::FindPoliceBoatMissionForWantedLevel()
{ {
switch (CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_pWanted->m_nWantedLevel) { switch (CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_pWanted->GetWantedLevel()) {
case 0: case 0:
case 1: return MISSION_BLOCKPLAYER_FARAWAY; case 1: return MISSION_BLOCKPLAYER_FARAWAY;
case 2: case 2:
@ -664,7 +664,7 @@ uint8 CCarAI::FindPoliceBoatMissionForWantedLevel()
int32 CCarAI::FindPoliceCarSpeedForWantedLevel(CVehicle* pVehicle) 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 0: return CGeneral::GetRandomNumberInRange(12, 16);
case 1: return 25; case 1: return 25;
case 2: return 34; case 2: return 34;
@ -678,7 +678,7 @@ int32 CCarAI::FindPoliceCarSpeedForWantedLevel(CVehicle* pVehicle)
void CCarAI::MellowOutChaseSpeed(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(); float distanceToPlayer = (pVehicle->GetPosition() - FindPlayerCoors()).Magnitude();
if (FindPlayerVehicle()){ if (FindPlayerVehicle()){
if (distanceToPlayer < 10.0f) if (distanceToPlayer < 10.0f)
@ -695,7 +695,7 @@ void CCarAI::MellowOutChaseSpeed(CVehicle* pVehicle)
else else
pVehicle->AutoPilot.m_nCruiseSpeed = 25; 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(); float distanceToPlayer = (pVehicle->GetPosition() - FindPlayerCoors()).Magnitude();
if (FindPlayerVehicle()) { if (FindPlayerVehicle()) {
if (distanceToPlayer < 10.0f) if (distanceToPlayer < 10.0f)
@ -722,7 +722,7 @@ void CCarAI::MellowOutChaseSpeed(CVehicle* pVehicle)
void CCarAI::MellowOutChaseSpeedBoat(CVehicle* pVehicle) void CCarAI::MellowOutChaseSpeedBoat(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: pVehicle->AutoPilot.m_nCruiseSpeed = 8; break; case 0: pVehicle->AutoPilot.m_nCruiseSpeed = 8; break;
case 1: pVehicle->AutoPilot.m_nCruiseSpeed = 10; break; case 1: pVehicle->AutoPilot.m_nCruiseSpeed = 10; break;
case 2: pVehicle->AutoPilot.m_nCruiseSpeed = 15; break; case 2: pVehicle->AutoPilot.m_nCruiseSpeed = 15; break;

View file

@ -152,18 +152,18 @@ CCarCtrl::GenerateOneRandomCar()
CWanted* pWanted = pPlayer->m_pPed->m_pWanted; CWanted* pWanted = pPlayer->m_pPed->m_pWanted;
int carClass; int carClass;
int carModel; 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 && !CGame::IsInInterior() && ( pWanted->m_CurrentCops < pWanted->m_MaxCops && !CGame::IsInInterior() && (
pWanted->m_nWantedLevel > 3 || pWanted->GetWantedLevel() > 3 ||
pWanted->m_nWantedLevel > 2 && CTimer::GetTimeInMilliseconds() > LastTimeLawEnforcerCreated + 5000 || pWanted->GetWantedLevel() > 2 && CTimer::GetTimeInMilliseconds() > LastTimeLawEnforcerCreated + 5000 ||
pWanted->m_nWantedLevel > 1 && CTimer::GetTimeInMilliseconds() > LastTimeLawEnforcerCreated + 8000)) { pWanted->GetWantedLevel() > 1 && CTimer::GetTimeInMilliseconds() > LastTimeLawEnforcerCreated + 8000)) {
/* Last pWanted->m_nWantedLevel > 1 is unnecessary but I added it for better readability. */ /* 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. */ /* Wouldn't be surprised it was there originally but was optimized out. */
carClass = COPS; carClass = COPS;
carModel = ChoosePoliceCarModel(); carModel = ChoosePoliceCarModel();
}else{ }else{
carModel = ChooseModel(&zone, &carClass); carModel = ChooseModel(&zone, &carClass);
if (carModel == -1 || (carClass == COPS && pWanted->m_nWantedLevel >= 1)) if (carModel == -1 || (carClass == COPS && pWanted->GetWantedLevel() >= 1))
/* All cop spawns with wanted level are handled by condition above. */ /* 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. */ /* In particular it means that cop cars never spawn if player has wanted level of 1. */
return; return;
@ -296,7 +296,7 @@ CCarCtrl::GenerateOneRandomCar()
} }
if (!ThePaths.GenerateCarCreationCoors(vecTargetPos.x, vecTargetPos.y, frontX, frontY, if (!ThePaths.GenerateCarCreationCoors(vecTargetPos.x, vecTargetPos.y, frontX, frontY,
preferredDistance, angleLimit, invertAngleLimitTest, &spawnPosition, &curNodeId, &nextNodeId, preferredDistance, angleLimit, invertAngleLimitTest, &spawnPosition, &curNodeId, &nextNodeId,
&positionBetweenNodes, carClass == COPS && pWanted->m_nWantedLevel >= 1)) &positionBetweenNodes, carClass == COPS && pWanted->GetWantedLevel() >= 1))
return; return;
CPathNode* pCurNode = &ThePaths.m_pathNodes[curNodeId]; CPathNode* pCurNode = &ThePaths.m_pathNodes[curNodeId];
CPathNode* pNextNode = &ThePaths.m_pathNodes[nextNodeId]; CPathNode* pNextNode = &ThePaths.m_pathNodes[nextNodeId];
@ -360,7 +360,7 @@ CCarCtrl::GenerateOneRandomCar()
switch (carClass) { switch (carClass) {
case COPS: case COPS:
pVehicle->AutoPilot.m_nTempAction = TEMPACT_NONE; 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_nCruiseSpeed = CCarAI::FindPoliceCarSpeedForWantedLevel(pVehicle);
pVehicle->AutoPilot.m_fMaxTrafficSpeed = pVehicle->AutoPilot.m_nCruiseSpeed / 2; pVehicle->AutoPilot.m_fMaxTrafficSpeed = pVehicle->AutoPilot.m_nCruiseSpeed / 2;
pVehicle->AutoPilot.m_nCarMission = CCarAI::FindPoliceCarMissionForWantedLevel(); pVehicle->AutoPilot.m_nCarMission = CCarAI::FindPoliceCarMissionForWantedLevel();
@ -3166,7 +3166,7 @@ void CCarCtrl::FindLinksToGoWithTheseNodes(CVehicle* pVehicle)
void CCarCtrl::GenerateEmergencyServicesCar(void) void CCarCtrl::GenerateEmergencyServicesCar(void)
{ {
if (FindPlayerPed()->m_pWanted->m_nWantedLevel > 3) if (FindPlayerPed()->m_pWanted->GetWantedLevel() > 3)
return; return;
if (CGame::IsInInterior()) if (CGame::IsInInterior())
return; return;

View file

@ -222,7 +222,7 @@ CGameLogic::Update()
pPlayerInfo.m_WBState = WBSTATE_PLAYING; pPlayerInfo.m_WBState = WBSTATE_PLAYING;
int takeMoney; int takeMoney;
switch (pPlayerInfo.m_pPed->m_pWanted->m_nWantedLevel) { switch (pPlayerInfo.m_pPed->m_pWanted->GetWantedLevel()) {
case 0: case 0:
case 1: case 1:
takeMoney = 100; takeMoney = 100;

View file

@ -452,7 +452,7 @@ void CGarage::Update()
m_eGarageState = GS_OPENING; m_eGarageState = GS_OPENING;
DMAudio.PlayFrontEndSound(SOUND_GARAGE_OPENING, 1); DMAudio.PlayFrontEndSound(SOUND_GARAGE_OPENING, 1);
bool bTakeMoney = false; bool bTakeMoney = false;
if (FindPlayerPed()->m_pWanted->m_nWantedLevel != 0) { if (FindPlayerPed()->m_pWanted->GetWantedLevel() != 0) {
bTakeMoney = true; bTakeMoney = true;
FindPlayerPed()->m_pWanted->Suspend(); FindPlayerPed()->m_pWanted->Suspend();
} }

View file

@ -278,7 +278,7 @@ CPickup::CanBePickedUp(CPlayerPed *player, int playerId)
bool cannotBePickedUp = bool cannotBePickedUp =
(m_pObject->GetModelIndex() == MI_PICKUP_BODYARMOUR && player->m_fArmour > CWorld::Players[playerId].m_nMaxArmour - 0.5f) (m_pObject->GetModelIndex() == MI_PICKUP_BODYARMOUR && player->m_fArmour > CWorld::Players[playerId].m_nMaxArmour - 0.5f)
|| (m_pObject->GetModelIndex() == MI_PICKUP_HEALTH && player->m_fHealth > CWorld::Players[playerId].m_nMaxHealth - 0.5f) || (m_pObject->GetModelIndex() == MI_PICKUP_HEALTH && player->m_fHealth > CWorld::Players[playerId].m_nMaxHealth - 0.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)); || (m_pObject->GetModelIndex() == MI_PICKUP_KILLFRENZY && (CTheScripts::IsPlayerOnAMission() || CDarkel::FrenzyOnGoing() || !CGame::nastyGame));
return !cannotBePickedUp; return !cannotBePickedUp;
} }
@ -784,7 +784,7 @@ CPickups::GivePlayerGoodiesWithPickUpMI(int16 modelIndex, int playerIndex)
DMAudio.PlayFrontEndSound(SOUND_PICKUP_BONUS, 0); DMAudio.PlayFrontEndSound(SOUND_PICKUP_BONUS, 0);
return true; return true;
} else if (modelIndex == MI_PICKUP_BRIBE) { } else if (modelIndex == MI_PICKUP_BRIBE) {
int32 level = Max(FindPlayerPed()->m_pWanted->m_nWantedLevel - 1, 0); int32 level = Max(FindPlayerPed()->m_pWanted->GetWantedLevel() - 1, 0);
player->SetWantedLevel(level); player->SetWantedLevel(level);
DMAudio.PlayFrontEndSound(SOUND_PICKUP_BONUS, 0); DMAudio.PlayFrontEndSound(SOUND_PICKUP_BONUS, 0);
return true; return true;

View file

@ -4545,7 +4545,7 @@ int8 CRunningScript::ProcessCommands200To299(int32 command)
return 0; return 0;
case COMMAND_IS_WANTED_LEVEL_GREATER: case COMMAND_IS_WANTED_LEVEL_GREATER:
CollectParameters(&m_nIp, 2); 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; return 0;
case COMMAND_CLEAR_WANTED_LEVEL: case COMMAND_CLEAR_WANTED_LEVEL:
CollectParameters(&m_nIp, 1); CollectParameters(&m_nIp, 1);

View file

@ -1030,7 +1030,7 @@ int8 CRunningScript::ProcessCommands400To499(int32 command)
CollectParameters(&m_nIp, 1); CollectParameters(&m_nIp, 1);
CPlayerPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed; CPlayerPed* pPed = CWorld::Players[ScriptParams[0]].m_pPed;
script_assert(pPed); script_assert(pPed);
ScriptParams[0] = pPed->m_pWanted->m_nWantedLevel; ScriptParams[0] = pPed->m_pWanted->GetWantedLevel();
StoreParameters(&m_nIp, 1); StoreParameters(&m_nIp, 1);
return 0; return 0;
} }

View file

@ -67,7 +67,7 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command)
case COMMAND_WANTED_STARS_ARE_FLASHING: case COMMAND_WANTED_STARS_ARE_FLASHING:
{ {
CWanted* pWanted = CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_pWanted; CWanted* pWanted = CWorld::Players[CWorld::PlayerInFocus].m_pPed->m_pWanted;
UpdateCompareFlag(pWanted->m_nMinWantedLevel - pWanted->m_nWantedLevel > 0); UpdateCompareFlag(pWanted->m_nMinWantedLevel - pWanted->GetWantedLevel() > 0);
return 0; return 0;
} }
case COMMAND_SET_ALLOW_HURRICANES: case COMMAND_SET_ALLOW_HURRICANES:

View file

@ -86,7 +86,7 @@ void CSetPiece::Update(void)
switch (m_nType) { switch (m_nType) {
case SETPIECE_TWOCOPCARSINALLEY: case SETPIECE_TWOCOPCARSINALLEY:
{ {
if (FindPlayerPed()->m_pWanted->m_nWantedLevel < 1 || FindPlayerVehicle()) if (FindPlayerPed()->m_pWanted->GetWantedLevel() < 1 || FindPlayerVehicle())
return; return;
CVehicle* pVehicle1 = TryToGenerateCopCar(m_vSpawn1, m_vTarget1); CVehicle* pVehicle1 = TryToGenerateCopCar(m_vSpawn1, m_vTarget1);
if (!pVehicle1) if (!pVehicle1)
@ -120,7 +120,7 @@ void CSetPiece::Update(void)
} }
case SETPIECE_CARBLOCKINGPLAYERFROMSIDE: case SETPIECE_CARBLOCKINGPLAYERFROMSIDE:
{ {
if (FindPlayerPed()->m_pWanted->m_nWantedLevel < 2) if (FindPlayerPed()->m_pWanted->GetWantedLevel() < 2)
return; return;
if (!FindPlayerVehicle()) if (!FindPlayerVehicle())
return; return;
@ -143,7 +143,7 @@ void CSetPiece::Update(void)
} }
case SETPIECE_CARRAMMINGPLAYERFROMSIDE: case SETPIECE_CARRAMMINGPLAYERFROMSIDE:
{ {
if (FindPlayerPed()->m_pWanted->m_nWantedLevel < 2) if (FindPlayerPed()->m_pWanted->GetWantedLevel() < 2)
return; return;
if (!FindPlayerVehicle()) if (!FindPlayerVehicle())
return; return;
@ -166,7 +166,7 @@ void CSetPiece::Update(void)
} }
case SETPIECE_CREATECOPPERONFOOT: case SETPIECE_CREATECOPPERONFOOT:
{ {
if (FindPlayerPed()->m_pWanted->m_nWantedLevel < 1 || FindPlayerVehicle()) if (FindPlayerPed()->m_pWanted->GetWantedLevel() < 1 || FindPlayerVehicle())
return; return;
CCopPed* pCop = TryToGenerateCopPed(m_vSpawn1); CCopPed* pCop = TryToGenerateCopPed(m_vSpawn1);
if (!pCop) if (!pCop)
@ -180,7 +180,7 @@ void CSetPiece::Update(void)
} }
case SETPIECE_CREATETWOCOPPERSONFOOT: case SETPIECE_CREATETWOCOPPERSONFOOT:
{ {
if (FindPlayerPed()->m_pWanted->m_nWantedLevel < 1 || FindPlayerVehicle()) if (FindPlayerPed()->m_pWanted->GetWantedLevel() < 1 || FindPlayerVehicle())
return; return;
CCopPed* pCop = TryToGenerateCopPed(m_vSpawn1); CCopPed* pCop = TryToGenerateCopPed(m_vSpawn1);
if (!pCop) if (!pCop)
@ -204,7 +204,7 @@ void CSetPiece::Update(void)
} }
case SETPIECE_TWOCARSBLOCKINGPLAYERFROMSIDE: case SETPIECE_TWOCARSBLOCKINGPLAYERFROMSIDE:
{ {
if (FindPlayerPed()->m_pWanted->m_nWantedLevel < 2) if (FindPlayerPed()->m_pWanted->GetWantedLevel() < 2)
return; return;
if (!FindPlayerVehicle()) if (!FindPlayerVehicle())
return; return;
@ -242,7 +242,7 @@ void CSetPiece::Update(void)
} }
case SETPIECE_TWOCARSRAMMINGPLAYERFROMSIDE: case SETPIECE_TWOCARSRAMMINGPLAYERFROMSIDE:
{ {
if (FindPlayerPed()->m_pWanted->m_nWantedLevel < 2) if (FindPlayerPed()->m_pWanted->GetWantedLevel() < 2)
return; return;
if (!FindPlayerVehicle()) if (!FindPlayerVehicle())
return; return;

View file

@ -2954,7 +2954,7 @@ CCamera::TryToStartNewCamMode(int obbeMode)
if (CReplay::IsPlayingBack()) if (CReplay::IsPlayingBack())
return false; return false;
#endif #endif
if(FindPlayerPed()->m_pWanted->m_nWantedLevel < 1) if(FindPlayerPed()->m_pWanted->GetWantedLevel() < 1)
return false; return false;
if(FindPlayerVehicle() == nil) if(FindPlayerVehicle() == nil)
return false; return false;
@ -2982,7 +2982,7 @@ CCamera::TryToStartNewCamMode(int obbeMode)
if (CReplay::IsPlayingBack()) if (CReplay::IsPlayingBack())
return false; return false;
#endif #endif
if(FindPlayerPed()->m_pWanted->m_nWantedLevel < 1) if(FindPlayerPed()->m_pWanted->GetWantedLevel() < 1)
return false; return false;
if(FindPlayerVehicle() == nil) if(FindPlayerVehicle() == nil)
return false; return false;

View file

@ -220,7 +220,7 @@ CEventList::ReportCrimeForEvent(eEventType type, intptr crimeId, bool copsDontCa
default: crime = CRIME_NONE; break; default: crime = CRIME_NONE; break;
} }
if (crime == CRIME_HIT_PED && IsPedPointerValid((CPed*)crimeId) && FindPlayerPed()->m_pWanted->m_nWantedLevel == 0 && ((CPed*)crimeId)->bBeingChasedByPolice) { if (crime == CRIME_HIT_PED && IsPedPointerValid((CPed*)crimeId) && FindPlayerPed()->m_pWanted->GetWantedLevel() == 0 && ((CPed*)crimeId)->bBeingChasedByPolice) {
if (!((CPed*)crimeId)->DyingOrDead()) { if (!((CPed*)crimeId)->DyingOrDead()) {
CMessages::AddBigMessage(TheText.Get("GOODBOY"), 5000, 0); CMessages::AddBigMessage(TheText.Get("GOODBOY"), 5000, 0);
CWorld::Players[CWorld::PlayerInFocus].m_nMoney += 50; CWorld::Players[CWorld::PlayerInFocus].m_nMoney += 50;

View file

@ -70,7 +70,7 @@ bool CPad::bOldDisplayNoControllerMessage;
bool CPad::m_bMapPadOneToPadTwo; bool CPad::m_bMapPadOneToPadTwo;
bool CPad::m_bDebugCamPCOn; bool CPad::m_bDebugCamPCOn;
bool CPad::bHasPlayerCheated; bool CPad::bHasPlayerCheated;
bool CPad::bInvertLook4Pad; bool CPad::bInvertLook4Pad = true;
#ifdef GTA_PS2 #ifdef GTA_PS2
unsigned char act_direct[6]; unsigned char act_direct[6];
unsigned char act_align[6]; unsigned char act_align[6];
@ -457,7 +457,7 @@ void ArmourCheat()
void WantedLevelUpCheat() void WantedLevelUpCheat()
{ {
CHud::SetHelpMessage(TheText.Get("CHEAT5"), true); CHud::SetHelpMessage(TheText.Get("CHEAT5"), true);
FindPlayerPed()->m_pWanted->CheatWantedLevel(Min(FindPlayerPed()->m_pWanted->m_nWantedLevel + 2, 6)); FindPlayerPed()->m_pWanted->CheatWantedLevel(Min(FindPlayerPed()->m_pWanted->GetWantedLevel() + 2, 6));
} }
void WantedLevelDownCheat() void WantedLevelDownCheat()

View file

@ -481,7 +481,7 @@ CPlayerInfo::Process(void)
CStats::DistanceTravelledOnFoot += FindPlayerPed()->m_fDistanceTravelled; CStats::DistanceTravelledOnFoot += FindPlayerPed()->m_fDistanceTravelled;
} }
if (m_pPed->m_pWanted->m_nWantedLevel && !CTheScripts::IsPlayerOnAMission()) { if (m_pPed->m_pWanted->GetWantedLevel() && !CTheScripts::IsPlayerOnAMission()) {
float maxDelta = 0.0f; float maxDelta = 0.0f;
static bool movedSignificantly = true; static bool movedSignificantly = true;
static bool thereIsACarPathNear = true; static bool thereIsACarPathNear = true;
@ -493,7 +493,7 @@ CPlayerInfo::Process(void)
lastPlayerPos = FindPlayerCoors(); lastPlayerPos = FindPlayerCoors();
thereIsACarPathNear = ThePaths.FindNodeClosestToCoors(FindPlayerCoors(), PATH_CAR, 60.0f, true, false, false, false) != 0; thereIsACarPathNear = ThePaths.FindNodeClosestToCoors(FindPlayerCoors(), PATH_CAR, 60.0f, true, false, false, false) != 0;
} }
switch (m_pPed->m_pWanted->m_nWantedLevel) { switch (m_pPed->m_pWanted->GetWantedLevel()) {
case 1: case 1:
maxDelta = 31.f; maxDelta = 31.f;
break; break;

View file

@ -157,7 +157,7 @@ enum Config {
// This is enabled for all released games. // This is enabled for all released games.
// any debug stuff that isn't left in any game is not in FINAL // any debug stuff that isn't left in any game is not in FINAL
//#define FINAL #define FINAL
// This is enabled for all released games except mobile // This is enabled for all released games except mobile
// any debug stuff that is only left in mobile, is not in MASTER // any debug stuff that is only left in mobile, is not in MASTER
@ -190,7 +190,7 @@ enum Config {
#define NO_CDCHECK #define NO_CDCHECK
// those infamous texts // those infamous texts
#define DRAW_GAME_VERSION_TEXT //#define DRAW_GAME_VERSION_TEXT
// Memory allocation and compression // Memory allocation and compression
// #define USE_CUSTOM_ALLOCATOR // use CMemoryHeap for allocation. use with care, not finished yet // #define USE_CUSTOM_ALLOCATOR // use CMemoryHeap for allocation. use with care, not finished yet
@ -223,7 +223,7 @@ enum Config {
#undef DRAW_GAME_VERSION_TEXT #undef DRAW_GAME_VERSION_TEXT
#else #else
// not in master builds // not in master builds
#define VALIDATE_SAVE_SIZE // #define VALIDATE_SAVE_SIZE
#define NO_MOVIES // disable intro videos #define NO_MOVIES // disable intro videos
#define DEBUGMENU #define DEBUGMENU
@ -231,7 +231,7 @@ enum Config {
#ifdef FINAL #ifdef FINAL
// in all games // in all games
# define USE_MY_DOCUMENTS // use my documents directory for user files //# define USE_MY_DOCUMENTS // use my documents directory for user files
#else #else
// not in any game // not in any game
# define CHATTYSPLASH // print what the game is loading # define CHATTYSPLASH // print what the game is loading
@ -240,7 +240,7 @@ enum Config {
#define FIX_BUGS // fixes bugs that we've came across during reversing. You can undefine this only on release builds. #define FIX_BUGS // fixes bugs that we've came across during reversing. You can undefine this only on release builds.
//#define MORE_LANGUAGES // Add more translations to the game //#define MORE_LANGUAGES // Add more translations to the game
#define COMPATIBLE_SAVES // this allows changing structs while keeping saves compatible //#define COMPATIBLE_SAVES // this allows changing structs while keeping saves compatible
#define LOAD_INI_SETTINGS // as the name suggests. fundamental for CUSTOM_FRONTEND_OPTIONS #define LOAD_INI_SETTINGS // as the name suggests. fundamental for CUSTOM_FRONTEND_OPTIONS
#define FIX_HIGH_FPS_BUGS_ON_FRONTEND #define FIX_HIGH_FPS_BUGS_ON_FRONTEND
@ -311,8 +311,8 @@ enum Config {
//# define PS2_MENU_USEALLPAGEICONS //# define PS2_MENU_USEALLPAGEICONS
#else #else
# define MAP_ENHANCEMENTS // Adding waypoint and better mouse support # define MAP_ENHANCEMENTS // Adding waypoint and better mouse support
# define TRIANGLE_BACK_BUTTON //# define TRIANGLE_BACK_BUTTON
//# define CIRCLE_BACK_BUTTON # define CIRCLE_BACK_BUTTON
#define LEGACY_MENU_OPTIONS // i.e. frame sync(vsync) #define LEGACY_MENU_OPTIONS // i.e. frame sync(vsync)
#define MUCH_SHORTER_OUTRO_SCREEN #define MUCH_SHORTER_OUTRO_SCREEN
// #define XBOX_MESSAGE_SCREEN // Blue background, no "saved successfully press OK" screen etc. // #define XBOX_MESSAGE_SCREEN // Blue background, no "saved successfully press OK" screen etc.
@ -341,11 +341,11 @@ static_assert(false, "SUPPORT_XBOX_SCRIPT and SUPPORT_MOBILE_SCRIPT are mutually
//#define MISSION_REPLAY // mobile feature //#define MISSION_REPLAY // mobile feature
#endif #endif
//#define SIMPLIER_MISSIONS // apply simplifications from mobile //#define SIMPLIER_MISSIONS // apply simplifications from mobile
#define USE_ADVANCED_SCRIPT_DEBUG_OUTPUT // #define USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
#define SCRIPT_LOG_FILE_LEVEL 0 // 0 == no log, 1 == overwrite every frame, 2 == full log #define SCRIPT_LOG_FILE_LEVEL 0 // 0 == no log, 1 == overwrite every frame, 2 == full log
#ifndef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT #ifndef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
#define USE_BASIC_SCRIPT_DEBUG_OUTPUT // #define USE_BASIC_SCRIPT_DEBUG_OUTPUT
#endif #endif
#ifdef MASTER #ifdef MASTER
@ -366,7 +366,7 @@ static_assert(false, "SUPPORT_XBOX_SCRIPT and SUPPORT_MOBILE_SCRIPT are mutually
#define CAMERA_PICKUP #define CAMERA_PICKUP
// Peds // Peds
#define CANCELLABLE_CAR_ENTER //#define CANCELLABLE_CAR_ENTER
// Camera // Camera
#define IMPROVED_CAMERA // Better Debug cam, and maybe more in the future #define IMPROVED_CAMERA // Better Debug cam, and maybe more in the future
@ -374,7 +374,7 @@ static_assert(false, "SUPPORT_XBOX_SCRIPT and SUPPORT_MOBILE_SCRIPT are mutually
// Audio // Audio
#define AUDIO_CACHE // cache sound lengths to speed up the cold boot #define AUDIO_CACHE // cache sound lengths to speed up the cold boot
//#define PS2_AUDIO_PATHS // changes audio paths for cutscenes and radio to PS2 paths (needs vbdec on MSS builds) #define PS2_AUDIO_PATHS // changes audio paths for cutscenes and radio to PS2 paths (needs vbdec on MSS builds)
//#define AUDIO_OAL_USE_SNDFILE // use libsndfile to decode WAVs instead of our internal decoder //#define AUDIO_OAL_USE_SNDFILE // use libsndfile to decode WAVs instead of our internal decoder
#define AUDIO_OAL_USE_MPG123 // use mpg123 to support mp3 files #define AUDIO_OAL_USE_MPG123 // use mpg123 to support mp3 files

View file

@ -196,7 +196,7 @@ CCopPed::ClearPursuit(void)
m_bZoneDisabled = false; m_bZoneDisabled = false;
ClearObjective(); ClearObjective();
if (IsPedInControl()) { 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)) { if (m_pMyVehicle && (m_pMyVehicle->GetPosition() - GetPosition()).MagnitudeSqr() < sq(5.0f)) {
m_nLastPedState = PED_IDLE; m_nLastPedState = PED_IDLE;
SetSeek((CEntity*)m_pMyVehicle, 2.5f); SetSeek((CEntity*)m_pMyVehicle, 2.5f);
@ -295,7 +295,7 @@ CCopPed::ScanForCrimes(void)
if (!m_bIsInPursuit) { if (!m_bIsInPursuit) {
CPlayerPed *player = FindPlayerPed(); CPlayerPed *player = FindPlayerPed();
if ((m_objective == OBJECTIVE_ENTER_CAR_AS_DRIVER || m_objective == OBJECTIVE_ENTER_CAR_AS_PASSENGER) 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 if (player->m_pMyVehicle
#ifdef FIX_BUGS #ifdef FIX_BUGS
@ -311,7 +311,7 @@ void
CCopPed::CopAI(void) CCopPed::CopAI(void)
{ {
CWanted *wanted = FindPlayerPed()->m_pWanted; CWanted *wanted = FindPlayerPed()->m_pWanted;
int wantedLevel = wanted->m_nWantedLevel; int wantedLevel = wanted->GetWantedLevel();
CPhysical *playerOrHisVeh = FindPlayerVehicle() ? (CPhysical*)FindPlayerVehicle() : (CPhysical*)FindPlayerPed(); CPhysical *playerOrHisVeh = FindPlayerVehicle() ? (CPhysical*)FindPlayerVehicle() : (CPhysical*)FindPlayerPed();
if (wanted->m_bIgnoredByEveryone || wanted->m_bIgnoredByCops) { if (wanted->m_bIgnoredByEveryone || wanted->m_bIgnoredByCops) {

View file

@ -924,7 +924,7 @@ CPed::ProcessObjective(void)
m_pMyVehicle->SetStatus(STATUS_PHYSICS); m_pMyVehicle->SetStatus(STATUS_PHYSICS);
m_pMyVehicle->AutoPilot.m_nPrevRouteNode = 0; m_pMyVehicle->AutoPilot.m_nPrevRouteNode = 0;
if (m_nPedType == PEDTYPE_COP) { 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(); m_pMyVehicle->AutoPilot.m_nCarMission = CCarAI::FindPoliceCarMissionForWantedLevel();
} else { } else {
m_pMyVehicle->AutoPilot.m_nCruiseSpeed = GAME_SPEED_TO_CARAI_SPEED * m_pMyVehicle->pHandling->Transmission.fMaxCruiseVelocity * 0.8f; m_pMyVehicle->AutoPilot.m_nCruiseSpeed = GAME_SPEED_TO_CARAI_SPEED * m_pMyVehicle->pHandling->Transmission.fMaxCruiseVelocity * 0.8f;

View file

@ -1654,7 +1654,7 @@ CPlayerPed::ProcessControl(void)
if (m_nEvadeAmount == 0) if (m_nEvadeAmount == 0)
m_pEvadingFrom = nil; m_pEvadingFrom = nil;
if (m_pWanted->m_nWantedLevel > 0) if (m_pWanted->GetWantedLevel() > 0)
FindNewAttackPoints(); FindNewAttackPoints();
UpdateMeleeAttackers(); UpdateMeleeAttackers();

View file

@ -537,7 +537,7 @@ CPopulation::AddToPopulation(float minDist, float maxDist, float minDistOffScree
CTheZones::GetZoneInfoForTimeOfDay(&playerCentreOfWorld, &zoneInfo); CTheZones::GetZoneInfoForTimeOfDay(&playerCentreOfWorld, &zoneInfo);
CWanted *wantedInfo = playerInfo->m_pPed->m_pWanted; CWanted *wantedInfo = playerInfo->m_pPed->m_pWanted;
if (wantedInfo->m_nWantedLevel > 2) { if (wantedInfo->GetWantedLevel() > 2) {
if (!CGame::IsInInterior() && (CGeneral::GetRandomNumber() % 32 == 0) && FindPlayerVehicle()) if (!CGame::IsInInterior() && (CGeneral::GetRandomNumber() % 32 == 0) && FindPlayerVehicle())
forceAddingCop = true; forceAddingCop = true;

View file

@ -619,11 +619,11 @@ void CHud::Draw()
/* /*
DrawWantedLevel DrawWantedLevel
*/ */
if (m_LastWanted == playerPed->m_pWanted->m_nWantedLevel) { if (m_LastWanted == playerPed->m_pWanted->GetWantedLevel()) {
alpha = DrawFadeState(HUD_WANTED_FADING, 0); alpha = DrawFadeState(HUD_WANTED_FADING, 0);
} else { } else {
alpha = DrawFadeState(HUD_WANTED_FADING, 1); alpha = DrawFadeState(HUD_WANTED_FADING, 1);
m_LastWanted = playerPed->m_pWanted->m_nWantedLevel; m_LastWanted = playerPed->m_pWanted->GetWantedLevel();
} }
if (m_WantedState != FADED_OUT) { if (m_WantedState != FADED_OUT) {
@ -639,7 +639,7 @@ void CHud::Draw()
for (int i = 0; i < 6; i++) { for (int i = 0; i < 6; i++) {
if (FrontEndMenuManager.m_PrefsShowHud) { if (FrontEndMenuManager.m_PrefsShowHud) {
if (playerPed->m_pWanted->m_nWantedLevel > i if (playerPed->m_pWanted->GetWantedLevel() > i
&& (CTimer::GetTimeInMilliseconds() > playerPed->m_pWanted->m_nLastWantedLevelChange && (CTimer::GetTimeInMilliseconds() > playerPed->m_pWanted->m_nLastWantedLevelChange
+ 2000 || CTimer::GetFrameCounter() & 4)) { + 2000 || CTimer::GetFrameCounter() & 4)) {
@ -652,7 +652,7 @@ void CHud::Draw()
CFont::SetColor(WANTED_COLOR_FLASH); CFont::SetColor(WANTED_COLOR_FLASH);
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(110.0f + 23.0f * i), SCREEN_SCALE_Y(87.0f), sPrintIcon); CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(110.0f + 23.0f * i), SCREEN_SCALE_Y(87.0f), sPrintIcon);
} else if (playerPed->m_pWanted->m_nWantedLevel <= i) { } else if (playerPed->m_pWanted->GetWantedLevel() <= i) {
NOTWANTED_COLOR.a = alpha; NOTWANTED_COLOR.a = alpha;
CFont::SetColor(NOTWANTED_COLOR); CFont::SetColor(NOTWANTED_COLOR);
CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(110.0f + 23.0f * i), SCREEN_SCALE_Y(87.0f), sPrintIcon); CFont::PrintString(SCREEN_SCALE_FROM_RIGHT(110.0f + 23.0f * i), SCREEN_SCALE_Y(87.0f), sPrintIcon);

View file

@ -347,7 +347,7 @@ GenericLoad()
#endif #endif
ReadDataFromBufferPointer(buf, CGame::currArea); ReadDataFromBufferPointer(buf, CGame::currArea);
ReadDataFromBufferPointer(buf, CVehicle::bAllTaxisHaveNitro); ReadDataFromBufferPointer(buf, CVehicle::bAllTaxisHaveNitro);
ReadDataFromBufferPointer(buf, CPad::bInvertLook4Pad); buf += align4bytes(sizeof(CPad::bInvertLook4Pad));
ReadDataFromBufferPointer(buf, CTimeCycle::m_ExtraColour); ReadDataFromBufferPointer(buf, CTimeCycle::m_ExtraColour);
ReadDataFromBufferPointer(buf, CTimeCycle::m_bExtraColourOn); ReadDataFromBufferPointer(buf, CTimeCycle::m_bExtraColourOn);
ReadDataFromBufferPointer(buf, CTimeCycle::m_ExtraColourInter); ReadDataFromBufferPointer(buf, CTimeCycle::m_ExtraColourInter);

View file

@ -135,9 +135,9 @@ CBoat::ProcessControl(void)
m_fBuoyancy *= 0.99f; m_fBuoyancy *= 0.99f;
#ifdef FIX_BUGS #ifdef FIX_BUGS
if(FindPlayerPed() && FindPlayerPed()->m_pWanted->m_nWantedLevel > 0 && GetModelIndex() == MI_PREDATOR){ if(FindPlayerPed() && FindPlayerPed()->m_pWanted->GetWantedLevel() > 0 && GetModelIndex() == MI_PREDATOR){
#else #else
if(FindPlayerPed()->m_pWanted->m_nWantedLevel > 0 && GetModelIndex() == MI_PREDATOR){ if(FindPlayerPed()->m_pWanted->GetWantedLevel() > 0 && GetModelIndex() == MI_PREDATOR){
#endif #endif
CVehicle *playerVeh = FindPlayerVehicle(); CVehicle *playerVeh = FindPlayerVehicle();
if(playerVeh && playerVeh->GetVehicleAppearance() == VEHICLE_APPEARANCE_BOAT && if(playerVeh && playerVeh->GetVehicleAppearance() == VEHICLE_APPEARANCE_BOAT &&

View file

@ -480,7 +480,7 @@ CHeli::ProcessControl(void)
// Shoot // Shoot
int shootTimeout; int shootTimeout;
if (m_heliType == HELI_TYPE_RANDOM) { if (m_heliType == HELI_TYPE_RANDOM) {
switch (FindPlayerPed()->m_pWanted->m_nWantedLevel) { switch (FindPlayerPed()->m_pWanted->GetWantedLevel()) {
case 0: case 0:
case 1: case 1:
case 2: shootTimeout = 999999; break; case 2: shootTimeout = 999999; break;

View file

@ -1495,7 +1495,7 @@ CVehicle::MakeNonDraggedPedsLeaveVehicle(CPed *ped1, CPed *ped2, CPlayerPed *&pl
cop = nil; cop = nil;
if(ped1->IsPlayer() && ped2->m_nPedType == PEDTYPE_COP && if(ped1->IsPlayer() && ped2->m_nPedType == PEDTYPE_COP &&
((CPlayerPed*)ped1)->m_pWanted->m_nWantedLevel > 0 && ((CPlayerPed*)ped1)->m_pWanted->GetWantedLevel() > 0 &&
ped2->m_pedInObjective == ped1){ ped2->m_pedInObjective == ped1){
player = (CPlayerPed*)ped1; player = (CPlayerPed*)ped1;
cop = (CCopPed*)ped2; cop = (CCopPed*)ped2;
@ -1525,7 +1525,7 @@ CVehicle::MakeNonDraggedPedsLeaveVehicle(CPed *ped1, CPed *ped2, CPlayerPed *&pl
int numPeds3 = 0; int numPeds3 = 0;
for(i = 0; i < numPeds; i++){ for(i = 0; i < numPeds; i++){
if(peds[i]->IsPlayer() && ped2->m_nPedType == PEDTYPE_COP && if(peds[i]->IsPlayer() && ped2->m_nPedType == PEDTYPE_COP &&
((CPlayerPed*)peds[i])->m_pWanted->m_nWantedLevel > 0 && ((CPlayerPed*)peds[i])->m_pWanted->GetWantedLevel() > 0 &&
ped2->m_pedInObjective == peds[i]){ ped2->m_pedInObjective == peds[i]){
player = (CPlayerPed*)peds[i]; player = (CPlayerPed*)peds[i];
cop = (CCopPed*)ped2; cop = (CCopPed*)ped2;