summaryrefslogtreecommitdiffstats
path: root/src/peds/Population.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-03-24 09:02:41 +0100
committeraap <aap@papnet.eu>2020-03-24 09:02:41 +0100
commitc7bdecdd90003b6c204efc44f506b43cfef006f7 (patch)
treec355d95a71810e6f4c33a6a06de65b126655ad3f /src/peds/Population.cpp
parentadded an assert to CPed::BuildPedLists, but too many peds still crash the game (diff)
downloadre3-c7bdecdd90003b6c204efc44f506b43cfef006f7.tar
re3-c7bdecdd90003b6c204efc44f506b43cfef006f7.tar.gz
re3-c7bdecdd90003b6c204efc44f506b43cfef006f7.tar.bz2
re3-c7bdecdd90003b6c204efc44f506b43cfef006f7.tar.lz
re3-c7bdecdd90003b6c204efc44f506b43cfef006f7.tar.xz
re3-c7bdecdd90003b6c204efc44f506b43cfef006f7.tar.zst
re3-c7bdecdd90003b6c204efc44f506b43cfef006f7.zip
Diffstat (limited to 'src/peds/Population.cpp')
-rw-r--r--src/peds/Population.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/peds/Population.cpp b/src/peds/Population.cpp
index 9876f946..d87764ff 100644
--- a/src/peds/Population.cpp
+++ b/src/peds/Population.cpp
@@ -575,7 +575,7 @@ CPopulation::AddToPopulation(float minDist, float maxDist, float minDistOffScree
}
}
// Yeah, float
- float maxPossiblePedsForArea = 10.0f * (zoneInfo.pedDensity + zoneInfo.carDensity) * playerInfo->m_fRoadDensity * PedDensityMultiplier * CIniFile::PedNumberMultiplier;
+ float maxPossiblePedsForArea = (zoneInfo.pedDensity + zoneInfo.carDensity) * playerInfo->m_fRoadDensity * PedDensityMultiplier * CIniFile::PedNumberMultiplier;
// maxPossiblePedsForArea = min(maxPossiblePedsForArea, MaxNumberOfPedsInUse);
if (ms_nTotalPeds < maxPossiblePedsForArea || addCop) {
@@ -637,19 +637,19 @@ CPopulation::AddToPopulation(float minDist, float maxDist, float minDistOffScree
if (pedTypeToAdd == PEDTYPE_COP) {
// Unused code, ChoosePolicePedOccupation returns COP_STREET. Spawning FBI/SWAT/Army done in somewhere else.
- if (modelToAdd != COP_STREET) {
- if (modelToAdd == COP_FBI) {
- if (!CModelInfo::GetModelInfo(MI_FBI)->GetRwObject())
- return;
+ if (modelToAdd == COP_STREET) {
+ if (!CModelInfo::GetModelInfo(MI_COP)->GetRwObject())
+ return;
- } else if (modelToAdd == COP_SWAT) {
- if (!CModelInfo::GetModelInfo(MI_SWAT)->GetRwObject())
- return;
+ } else if (modelToAdd == COP_FBI) {
+ if (!CModelInfo::GetModelInfo(MI_FBI)->GetRwObject())
+ return;
- } else if (modelToAdd == COP_ARMY && !CModelInfo::GetModelInfo(MI_ARMY)->GetRwObject()) {
+ } else if (modelToAdd == COP_SWAT) {
+ if (!CModelInfo::GetModelInfo(MI_SWAT)->GetRwObject())
return;
- }
- } else if (!CModelInfo::GetModelInfo(MI_COP)->GetRwObject()) {
+
+ } else if (modelToAdd == COP_ARMY && !CModelInfo::GetModelInfo(MI_ARMY)->GetRwObject()) {
return;
}
} else if (!CModelInfo::GetModelInfo(modelToAdd)->GetRwObject()) {