mirror of
https://github.com/halpz/re3.git
synced 2025-01-10 20:45:30 +00:00
Allow sector ped count to exceed gap-list size
This solves the gnNumTempPedList assertion. To prove this works, change gapTempPedList's length to 12, and visit the Triad's basketball court. # Conflicts: # src/peds/Ped.cpp
This commit is contained in:
parent
835fa4e74b
commit
d923cd2f24
|
@ -511,8 +511,20 @@ CPed::BuildPedLists(void)
|
||||||
continue;
|
continue;
|
||||||
deadsRegistered++;
|
deadsRegistered++;
|
||||||
}
|
}
|
||||||
|
#ifdef FIX_BUGS
|
||||||
|
// If the gap ped list is full, sort it and truncate it
|
||||||
|
// before pushing more unsorted peds
|
||||||
|
if( gnNumTempPedList == ARRAY_SIZE(gapTempPedList) - 1 )
|
||||||
|
{
|
||||||
|
gapTempPedList[gnNumTempPedList] = nil;
|
||||||
|
SortPeds(gapTempPedList, 0, gnNumTempPedList - 1);
|
||||||
|
gnNumTempPedList = ARRAY_SIZE(m_nearPeds);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
gapTempPedList[gnNumTempPedList] = ped;
|
gapTempPedList[gnNumTempPedList] = ped;
|
||||||
gnNumTempPedList++;
|
gnNumTempPedList++;
|
||||||
|
// NOTE: We cannot absolutely fill the gap list, as the list is null-terminated before being passed to SortPeds
|
||||||
assert(gnNumTempPedList < ARRAY_SIZE(gapTempPedList));
|
assert(gnNumTempPedList < ARRAY_SIZE(gapTempPedList));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue