From 19b21cafcd0e457155c71f339dbccb94aff72d83 Mon Sep 17 00:00:00 2001 From: aap Date: Thu, 7 May 2020 17:53:38 +0200 Subject: CZoneInfo mostly done; not its dependencies --- src/peds/Population.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/peds') diff --git a/src/peds/Population.cpp b/src/peds/Population.cpp index 43dd475d..ad537dc8 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; } -- cgit v1.2.3