little fixes

This commit is contained in:
aap
2021-01-08 13:51:42 +01:00
parent 824ca7599c
commit 8be0567924
5 changed files with 12 additions and 4 deletions

View File

@ -286,6 +286,7 @@ CPhoneInfo::Initialise(void)
CBuilding *building = pool->GetSlot(i);
if (building) {
if (building->GetModelIndex() == MI_PHONEBOOTH1) {
assert(m_nMax < ARRAY_SIZE(m_aPhones) && "NUMPHONES should be increased");
CPhone *maxPhone = &m_aPhones[m_nMax];
maxPhone->m_nState = PHONE_STATE_FREE;
maxPhone->m_vecPos = building->GetPosition();