diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-05-07 22:22:15 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-05-07 22:22:15 +0200 |
commit | b99346e6ca8bd6ee8d8d6b7cf1b21b9d06b0ab04 (patch) | |
tree | ab07a4b632108268d62700baf702536c1e87b4f9 /src/peds | |
parent | intermediate changes (diff) | |
parent | CBaseModelInfo done (diff) | |
download | re3-b99346e6ca8bd6ee8d8d6b7cf1b21b9d06b0ab04.tar re3-b99346e6ca8bd6ee8d8d6b7cf1b21b9d06b0ab04.tar.gz re3-b99346e6ca8bd6ee8d8d6b7cf1b21b9d06b0ab04.tar.bz2 re3-b99346e6ca8bd6ee8d8d6b7cf1b21b9d06b0ab04.tar.lz re3-b99346e6ca8bd6ee8d8d6b7cf1b21b9d06b0ab04.tar.xz re3-b99346e6ca8bd6ee8d8d6b7cf1b21b9d06b0ab04.tar.zst re3-b99346e6ca8bd6ee8d8d6b7cf1b21b9d06b0ab04.zip |
Diffstat (limited to 'src/peds')
-rw-r--r-- | src/peds/Population.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/peds/Population.cpp b/src/peds/Population.cpp index 3eb13b1b..ba8e1a74 100644 --- a/src/peds/Population.cpp +++ b/src/peds/Population.cpp @@ -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; } |