diff options
author | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-01-22 21:58:57 +0100 |
---|---|---|
committer | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-01-22 21:58:57 +0100 |
commit | 0ea72af60c3b24e6ef256bff739fadf4c93b9078 (patch) | |
tree | 515dcebc56c23355ec6ef9da6bfd652fdc4ec632 /src/peds/CivilianPed.cpp | |
parent | No more resetting bindings for joypad, create .ini at the first start, joystick hotplug for Linux (diff) | |
download | re3-0ea72af60c3b24e6ef256bff739fadf4c93b9078.tar re3-0ea72af60c3b24e6ef256bff739fadf4c93b9078.tar.gz re3-0ea72af60c3b24e6ef256bff739fadf4c93b9078.tar.bz2 re3-0ea72af60c3b24e6ef256bff739fadf4c93b9078.tar.lz re3-0ea72af60c3b24e6ef256bff739fadf4c93b9078.tar.xz re3-0ea72af60c3b24e6ef256bff739fadf4c93b9078.tar.zst re3-0ea72af60c3b24e6ef256bff739fadf4c93b9078.zip |
Diffstat (limited to '')
-rw-r--r-- | src/peds/CivilianPed.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/peds/CivilianPed.cpp b/src/peds/CivilianPed.cpp index a2f44357..1c4f10f5 100644 --- a/src/peds/CivilianPed.cpp +++ b/src/peds/CivilianPed.cpp @@ -264,15 +264,11 @@ CCivilianPed::ProcessControl(void) m_pNextPathNode = nil; #ifdef PEDS_REPORT_CRIMES_ON_PHONE } else if (bRunningToPhone && m_objective < OBJECTIVE_FLEE_ON_FOOT_TILL_SAFE) { - if (!isPhoneAvailable(m_phoneId)) { + if (crimeReporters[m_phoneId] != this) { RestorePreviousState(); - if (crimeReporters[m_phoneId] == this) - crimeReporters[m_phoneId] = nil; - m_phoneId = -1; bRunningToPhone = false; } else { - crimeReporters[m_phoneId] = this; m_facePhoneStart = true; SetPedState(PED_FACE_PHONE); } @@ -431,7 +427,8 @@ CPed::RunToReportCrime(eCrimeType crimeToReport) { #ifdef PEDS_REPORT_CRIMES_ON_PHONE if (bRunningToPhone) { - if (!isPhoneAvailable(m_phoneId)) { + if (!isPhoneAvailable(m_phoneId) && crimeReporters[m_phoneId] != this) { + crimeReporters[m_phoneId] = nil; m_phoneId = -1; bIsRunning = false; ClearSeek(); // clears bRunningToPhone @@ -456,6 +453,8 @@ CPed::RunToReportCrime(eCrimeType crimeToReport) #ifndef PEDS_REPORT_CRIMES_ON_PHONE if (phone->m_nState != PHONE_STATE_FREE) return false; +#else + crimeReporters[phoneId] = this; #endif bRunningToPhone = true; |