mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-12-23 17:40:00 +00:00
fix and cleanup in AddToPopulation
This commit is contained in:
parent
55b62e2134
commit
c7bdecdd90
|
@ -575,7 +575,7 @@ CPopulation::AddToPopulation(float minDist, float maxDist, float minDistOffScree
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Yeah, float
|
// 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);
|
// maxPossiblePedsForArea = min(maxPossiblePedsForArea, MaxNumberOfPedsInUse);
|
||||||
|
|
||||||
if (ms_nTotalPeds < maxPossiblePedsForArea || addCop) {
|
if (ms_nTotalPeds < maxPossiblePedsForArea || addCop) {
|
||||||
|
@ -637,8 +637,11 @@ CPopulation::AddToPopulation(float minDist, float maxDist, float minDistOffScree
|
||||||
|
|
||||||
if (pedTypeToAdd == PEDTYPE_COP) {
|
if (pedTypeToAdd == PEDTYPE_COP) {
|
||||||
// Unused code, ChoosePolicePedOccupation returns COP_STREET. Spawning FBI/SWAT/Army done in somewhere else.
|
// Unused code, ChoosePolicePedOccupation returns COP_STREET. Spawning FBI/SWAT/Army done in somewhere else.
|
||||||
if (modelToAdd != COP_STREET) {
|
if (modelToAdd == COP_STREET) {
|
||||||
if (modelToAdd == COP_FBI) {
|
if (!CModelInfo::GetModelInfo(MI_COP)->GetRwObject())
|
||||||
|
return;
|
||||||
|
|
||||||
|
} else if (modelToAdd == COP_FBI) {
|
||||||
if (!CModelInfo::GetModelInfo(MI_FBI)->GetRwObject())
|
if (!CModelInfo::GetModelInfo(MI_FBI)->GetRwObject())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -649,9 +652,6 @@ CPopulation::AddToPopulation(float minDist, float maxDist, float minDistOffScree
|
||||||
} else if (modelToAdd == COP_ARMY && !CModelInfo::GetModelInfo(MI_ARMY)->GetRwObject()) {
|
} else if (modelToAdd == COP_ARMY && !CModelInfo::GetModelInfo(MI_ARMY)->GetRwObject()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (!CModelInfo::GetModelInfo(MI_COP)->GetRwObject()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
} else if (!CModelInfo::GetModelInfo(modelToAdd)->GetRwObject()) {
|
} else if (!CModelInfo::GetModelInfo(modelToAdd)->GetRwObject()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue