Fix NearPed count going negative

This commit is contained in:
Magnus Larsen 2021-07-12 23:51:28 -07:00
parent e9baf31ad8
commit 894495689f

View file

@ -326,6 +326,7 @@ CPed::~CPed(void)
nearPed->m_nearPeds[k] = nearPed->m_nearPeds[k + 1];
nearPed->m_nearPeds[k + 1] = nil;
}
nearPed->m_nearPeds[ARRAY_SIZE(m_nearPeds) - 1] = nil;
nearPed->m_numNearPeds--;
} else
j++;