diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-05-13 16:55:12 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-05-13 16:55:12 +0200 |
commit | d4265884966496f3e1ab64cb61097555e43a549c (patch) | |
tree | 960d3b27ea4f34958599bfc26fe3dc07e34f03ba /src/control/Phones.cpp | |
parent | ped attractor: start (diff) | |
parent | Merge branch 'master' into miami (diff) | |
download | re3-d4265884966496f3e1ab64cb61097555e43a549c.tar re3-d4265884966496f3e1ab64cb61097555e43a549c.tar.gz re3-d4265884966496f3e1ab64cb61097555e43a549c.tar.bz2 re3-d4265884966496f3e1ab64cb61097555e43a549c.tar.lz re3-d4265884966496f3e1ab64cb61097555e43a549c.tar.xz re3-d4265884966496f3e1ab64cb61097555e43a549c.tar.zst re3-d4265884966496f3e1ab64cb61097555e43a549c.zip |
Diffstat (limited to '')
-rw-r--r-- | src/control/Phones.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/control/Phones.cpp b/src/control/Phones.cpp index 136ef7db..ee01b6c4 100644 --- a/src/control/Phones.cpp +++ b/src/control/Phones.cpp @@ -38,7 +38,7 @@ CPed* crimeReporters[NUMPHONES] = {}; bool isPhoneAvailable(int m_phoneId) { - return gPhoneInfo.m_aPhones[m_phoneId].m_nState == PHONE_STATE_FREE && + return gPhoneInfo.m_aPhones[m_phoneId].m_nState == PHONE_STATE_FREE && (crimeReporters[m_phoneId] == nil || !crimeReporters[m_phoneId]->IsPointerValid() || !crimeReporters[m_phoneId]->bRunningToPhone || crimeReporters[m_phoneId]->m_objective > OBJECTIVE_IDLE || 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)); @@ -194,10 +194,10 @@ CPhoneInfo::HasMessageBeenDisplayed(int phoneId) { if (bDisplayingPhoneMessage) return false; - + int state = m_aPhones[phoneId].m_nState; - return state == PHONE_STATE_REPEATED_MESSAGE_SHOWN_ONCE || + return state == PHONE_STATE_REPEATED_MESSAGE_SHOWN_ONCE || state == PHONE_STATE_ONETIME_MESSAGE_STARTED || state == PHONE_STATE_REPEATED_MESSAGE_STARTED; } @@ -218,7 +218,7 @@ INITSAVEBUF m_aPhones[i] = ReadSaveBuf<CPhone>(buf); // It's saved as building pool index in save file, convert it to true entity if (m_aPhones[i].m_pEntity) { - m_aPhones[i].m_pEntity = CPools::GetBuildingPool()->GetSlot((int)m_aPhones[i].m_pEntity - 1); + m_aPhones[i].m_pEntity = CPools::GetBuildingPool()->GetSlot((uintptr)m_aPhones[i].m_pEntity - 1); } } VALIDATESAVEBUF(size) |