summaryrefslogtreecommitdiffstats
path: root/src/control/Phones.cpp
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-05-11 04:55:57 +0200
committereray orçunus <erayorcunus@gmail.com>2020-05-11 20:00:55 +0200
commit8a4fa58cd42b7cca4a86fe2d9913b839b554bf10 (patch)
tree294e44de2168e1b581ba847775d827924c07bf2e /src/control/Phones.cpp
parentMerge pull request #509 from Fire-Head/master (diff)
downloadre3-8a4fa58cd42b7cca4a86fe2d9913b839b554bf10.tar
re3-8a4fa58cd42b7cca4a86fe2d9913b839b554bf10.tar.gz
re3-8a4fa58cd42b7cca4a86fe2d9913b839b554bf10.tar.bz2
re3-8a4fa58cd42b7cca4a86fe2d9913b839b554bf10.tar.lz
re3-8a4fa58cd42b7cca4a86fe2d9913b839b554bf10.tar.xz
re3-8a4fa58cd42b7cca4a86fe2d9913b839b554bf10.tar.zst
re3-8a4fa58cd42b7cca4a86fe2d9913b839b554bf10.zip
Diffstat (limited to 'src/control/Phones.cpp')
-rw-r--r--src/control/Phones.cpp8
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)