summaryrefslogtreecommitdiffstats
path: root/src/control/Phones.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2019-07-28 14:49:42 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2019-07-28 14:49:42 +0200
commit6fa6837baa0fde3ab6756b9135131b66f35eb9c6 (patch)
treecc09d8fe4bf6a5ea5034319b43f1cfe6e1ce14e7 /src/control/Phones.cpp
parentfix debug message (diff)
downloadre3-6fa6837baa0fde3ab6756b9135131b66f35eb9c6.tar
re3-6fa6837baa0fde3ab6756b9135131b66f35eb9c6.tar.gz
re3-6fa6837baa0fde3ab6756b9135131b66f35eb9c6.tar.bz2
re3-6fa6837baa0fde3ab6756b9135131b66f35eb9c6.tar.lz
re3-6fa6837baa0fde3ab6756b9135131b66f35eb9c6.tar.xz
re3-6fa6837baa0fde3ab6756b9135131b66f35eb9c6.tar.zst
re3-6fa6837baa0fde3ab6756b9135131b66f35eb9c6.zip
Diffstat (limited to 'src/control/Phones.cpp')
-rw-r--r--src/control/Phones.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/control/Phones.cpp b/src/control/Phones.cpp
index 499fa253..e2a9ee13 100644
--- a/src/control/Phones.cpp
+++ b/src/control/Phones.cpp
@@ -76,6 +76,7 @@ CPhoneInfo::Load(CPhoneInfo *source, uint8 buffer)
m_aPhones[phoneId].m_vecPos = phone->m_vecPos;
memcpy(m_aPhones[phoneId].m_apMessages, phone->m_apMessages, sizeof(wchar*) * 6);
+ m_aPhones[phoneId].m_lastTimeRepeatedMsgShown = phone->m_lastTimeRepeatedMsgShown;
m_aPhones[phoneId].m_pEntity = phone->m_pEntity;
m_aPhones[phoneId].m_nState = phone->m_nState;
m_aPhones[phoneId].field_30 = phone->field_30;
@@ -183,13 +184,14 @@ CPhoneInfo::Save(CPhoneInfo *destination, uint32 *size)
phone->m_vecPos = m_aPhones[phoneId].m_vecPos;
memcpy(phone->m_apMessages, m_aPhones[phoneId].m_apMessages, sizeof(wchar*) * 6);
+ phone->m_lastTimeRepeatedMsgShown = m_aPhones[phoneId].m_lastTimeRepeatedMsgShown;
phone->m_pEntity = m_aPhones[phoneId].m_pEntity;
phone->m_nState = m_aPhones[phoneId].m_nState;
phone->field_30 = m_aPhones[phoneId].field_30;
// Convert entity pointer to building pool index while saving
if (phone->m_pEntity) {
- phone->m_pEntity = (CEntity*) CPools::GetBuildingPool()->GetJustIndex((CBuilding*)phone->m_pEntity) + 1;
+ phone->m_pEntity = (CEntity*) (CPools::GetBuildingPool()->GetJustIndex((CBuilding*)phone->m_pEntity) + 1);
}
}
}