mirror of
https://github.com/GTAmodding/re3.git
synced 2025-10-13 09:40:34 +00:00
CZoneInfo mostly done; not its dependencies
This commit is contained in:
parent
8bb22b2ad8
commit
19b21cafcd
9 changed files with 134 additions and 220 deletions
|
@ -564,14 +564,12 @@ CPopulation::AddToPopulation(float minDist, float maxDist, float minDistOffScree
|
|||
|
||||
if (ms_nTotalPeds < maxPossiblePedsForArea || addCop) {
|
||||
int decisionThreshold = CGeneral::GetRandomNumberInRange(0, 1000);
|
||||
if (decisionThreshold < zoneInfo.copDensity || addCop) {
|
||||
if (decisionThreshold < zoneInfo.copPedThreshold || addCop) {
|
||||
pedTypeToAdd = PEDTYPE_COP;
|
||||
modelToAdd = ChoosePolicePedOccupation();
|
||||
} else {
|
||||
int16 density = zoneInfo.copDensity;
|
||||
for (int i = 0; i < NUM_GANGS; i++) {
|
||||
density += zoneInfo.gangDensity[i];
|
||||
if (decisionThreshold < density) {
|
||||
if (decisionThreshold < zoneInfo.gangPedThreshold[i]) {
|
||||
pedTypeToAdd = PEDTYPE_GANG1 + i;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue