summaryrefslogtreecommitdiffstats
path: root/src/control/Phones.cpp
diff options
context:
space:
mode:
authorerorcun <erayorcunus@gmail.com>2020-05-11 23:33:13 +0200
committerGitHub <noreply@github.com>2020-05-11 23:33:13 +0200
commit5f40f06bf024e3806e0fe5a92ca14ee6b22a9933 (patch)
tree3008c5a5977736453221f00daa1f34f9d292906b /src/control/Phones.cpp
parentRenderPedCB from VC (diff)
parentFix appveyor (hopefully) (diff)
downloadre3-5f40f06bf024e3806e0fe5a92ca14ee6b22a9933.tar
re3-5f40f06bf024e3806e0fe5a92ca14ee6b22a9933.tar.gz
re3-5f40f06bf024e3806e0fe5a92ca14ee6b22a9933.tar.bz2
re3-5f40f06bf024e3806e0fe5a92ca14ee6b22a9933.tar.lz
re3-5f40f06bf024e3806e0fe5a92ca14ee6b22a9933.tar.xz
re3-5f40f06bf024e3806e0fe5a92ca14ee6b22a9933.tar.zst
re3-5f40f06bf024e3806e0fe5a92ca14ee6b22a9933.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)