mirror of
https://gitlab.com/GaryOderNichts/re3-wiiu.git
synced 2024-11-26 02:54:14 +01:00
Peds reporting to phone changes for GTA3D
This commit is contained in:
parent
226e3b83da
commit
0ea72af60c
@ -40,7 +40,6 @@ bool
|
|||||||
isPhoneAvailable(int m_phoneId)
|
isPhoneAvailable(int m_phoneId)
|
||||||
{
|
{
|
||||||
return crimeReporters[m_phoneId] == nil || !crimeReporters[m_phoneId]->IsPointerValid() || crimeReporters[m_phoneId]->m_objective > OBJECTIVE_WAIT_ON_FOOT ||
|
return crimeReporters[m_phoneId] == nil || !crimeReporters[m_phoneId]->IsPointerValid() || crimeReporters[m_phoneId]->m_objective > OBJECTIVE_WAIT_ON_FOOT ||
|
||||||
crimeReporters[m_phoneId]->m_nLastPedState != PED_SEEK_POS &&
|
|
||||||
(crimeReporters[m_phoneId]->m_nPedState != PED_MAKE_CALL && crimeReporters[m_phoneId]->m_nPedState != PED_FACE_PHONE && crimeReporters[m_phoneId]->m_nPedState != PED_SEEK_POS);
|
(crimeReporters[m_phoneId]->m_nPedState != PED_MAKE_CALL && crimeReporters[m_phoneId]->m_nPedState != PED_FACE_PHONE && crimeReporters[m_phoneId]->m_nPedState != PED_SEEK_POS);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -264,15 +264,11 @@ CCivilianPed::ProcessControl(void)
|
|||||||
m_pNextPathNode = nil;
|
m_pNextPathNode = nil;
|
||||||
#ifdef PEDS_REPORT_CRIMES_ON_PHONE
|
#ifdef PEDS_REPORT_CRIMES_ON_PHONE
|
||||||
} else if (bRunningToPhone && m_objective < OBJECTIVE_FLEE_ON_FOOT_TILL_SAFE) {
|
} else if (bRunningToPhone && m_objective < OBJECTIVE_FLEE_ON_FOOT_TILL_SAFE) {
|
||||||
if (!isPhoneAvailable(m_phoneId)) {
|
if (crimeReporters[m_phoneId] != this) {
|
||||||
RestorePreviousState();
|
RestorePreviousState();
|
||||||
if (crimeReporters[m_phoneId] == this)
|
|
||||||
crimeReporters[m_phoneId] = nil;
|
|
||||||
|
|
||||||
m_phoneId = -1;
|
m_phoneId = -1;
|
||||||
bRunningToPhone = false;
|
bRunningToPhone = false;
|
||||||
} else {
|
} else {
|
||||||
crimeReporters[m_phoneId] = this;
|
|
||||||
m_facePhoneStart = true;
|
m_facePhoneStart = true;
|
||||||
SetPedState(PED_FACE_PHONE);
|
SetPedState(PED_FACE_PHONE);
|
||||||
}
|
}
|
||||||
@ -431,7 +427,8 @@ CPed::RunToReportCrime(eCrimeType crimeToReport)
|
|||||||
{
|
{
|
||||||
#ifdef PEDS_REPORT_CRIMES_ON_PHONE
|
#ifdef PEDS_REPORT_CRIMES_ON_PHONE
|
||||||
if (bRunningToPhone) {
|
if (bRunningToPhone) {
|
||||||
if (!isPhoneAvailable(m_phoneId)) {
|
if (!isPhoneAvailable(m_phoneId) && crimeReporters[m_phoneId] != this) {
|
||||||
|
crimeReporters[m_phoneId] = nil;
|
||||||
m_phoneId = -1;
|
m_phoneId = -1;
|
||||||
bIsRunning = false;
|
bIsRunning = false;
|
||||||
ClearSeek(); // clears bRunningToPhone
|
ClearSeek(); // clears bRunningToPhone
|
||||||
@ -456,6 +453,8 @@ CPed::RunToReportCrime(eCrimeType crimeToReport)
|
|||||||
#ifndef PEDS_REPORT_CRIMES_ON_PHONE
|
#ifndef PEDS_REPORT_CRIMES_ON_PHONE
|
||||||
if (phone->m_nState != PHONE_STATE_FREE)
|
if (phone->m_nState != PHONE_STATE_FREE)
|
||||||
return false;
|
return false;
|
||||||
|
#else
|
||||||
|
crimeReporters[phoneId] = this;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bRunningToPhone = true;
|
bRunningToPhone = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user