Peds: Efforts to find the reason of crashes on GCC 7.5.0
* Prevent deleted peds to be in nearPeds list (was always needed, might be unrelated to crashes) * Add asserts to nearPeds and PedIK ctor (crash reasons) * Shouldn't fix reported crashes since they were caused by null peds.
This commit is contained in:
@@ -644,9 +644,6 @@ CCopPed::ProcessControl(void)
|
||||
int numCopsNear = 0;
|
||||
for (int i = 0; i < player->m_numNearPeds; ++i) {
|
||||
CPed *nearPed = player->m_nearPeds[i];
|
||||
#ifdef FIX_BUGS
|
||||
if (nearPed)
|
||||
#endif
|
||||
if (nearPed->m_nPedType == PEDTYPE_COP && nearPed->m_nPedState != PED_DEAD)
|
||||
++numCopsNear;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user