summaryrefslogtreecommitdiffstats
path: root/src/peds
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-08-03 03:00:12 +0200
committereray orçunus <erayorcunus@gmail.com>2020-08-03 15:00:32 +0200
commite14252914e9bd4cf7702479b5e0b050b935ba4aa (patch)
treedf42291b9b6745f86097de4d58fc55e6a64b1b8c /src/peds
parentMove sdk and eax (diff)
downloadre3-e14252914e9bd4cf7702479b5e0b050b935ba4aa.tar
re3-e14252914e9bd4cf7702479b5e0b050b935ba4aa.tar.gz
re3-e14252914e9bd4cf7702479b5e0b050b935ba4aa.tar.bz2
re3-e14252914e9bd4cf7702479b5e0b050b935ba4aa.tar.lz
re3-e14252914e9bd4cf7702479b5e0b050b935ba4aa.tar.xz
re3-e14252914e9bd4cf7702479b5e0b050b935ba4aa.tar.zst
re3-e14252914e9bd4cf7702479b5e0b050b935ba4aa.zip
Diffstat (limited to '')
-rw-r--r--src/peds/CopPed.cpp4
-rw-r--r--src/peds/Population.cpp11
2 files changed, 13 insertions, 2 deletions
diff --git a/src/peds/CopPed.cpp b/src/peds/CopPed.cpp
index 6d106b0e..f289697e 100644
--- a/src/peds/CopPed.cpp
+++ b/src/peds/CopPed.cpp
@@ -45,7 +45,7 @@ CCopPed::CCopPed(eCopType copType) : CPed(PEDTYPE_COP)
SetCurrentWeapon(WEAPONTYPE_UZI);
m_fArmour = 50.0f;
m_wepSkills = 32; /* TODO: what is this? seems unused */
- m_wepAccuracy = 64;
+ m_wepAccuracy = 68;
break;
case COP_ARMY:
SetModelIndex(MI_ARMY);
@@ -479,7 +479,7 @@ CCopPed::CopAI(void)
SetAttack(playerOrHisVeh);
SetShootTimer(CGeneral::GetRandomNumberInRange(500, 1000));
}
- SetAttackTimer(CGeneral::GetRandomNumberInRange(100, 300));
+ SetAttackTimer(CGeneral::GetRandomNumberInRange(200, 300));
}
SetMoveState(PEDMOVE_STILL);
}
diff --git a/src/peds/Population.cpp b/src/peds/Population.cpp
index 1357907d..0756df38 100644
--- a/src/peds/Population.cpp
+++ b/src/peds/Population.cpp
@@ -1104,7 +1104,11 @@ CPopulation::ManagePopulation(void)
}
int pedPoolSize = CPools::GetPedPool()->GetSize();
+#ifndef SQUEEZE_PERFORMANCE
for (int poolIndex = pedPoolSize-1; poolIndex >= 0; poolIndex--) {
+#else
+ for (int poolIndex = (pedPoolSize * (frameMod32 + 1) / 32) - 1; poolIndex >= pedPoolSize * frameMod32 / 32; poolIndex--) {
+#endif
CPed *ped = CPools::GetPedPool()->GetSlot(poolIndex);
if (ped && !ped->IsPlayer() && ped->CanBeDeleted() && !ped->bInVehicle) {
@@ -1117,6 +1121,13 @@ CPopulation::ManagePopulation(void)
}
float dist = (ped->GetPosition() - playerPos).Magnitude2D();
+#ifdef SQUEEZE_PERFORMANCE
+ if (dist > 50.f)
+ ped->bUsesCollision = false;
+ else
+ ped->bUsesCollision = true;
+#endif
+
bool pedIsFarAway = false;
if (PedCreationDistMultiplier() * (PED_REMOVE_DIST_SPECIAL * TheCamera.GenerationDistMultiplier) < dist
|| (!ped->bCullExtraFarAway && PedCreationDistMultiplier() * PED_REMOVE_DIST * TheCamera.GenerationDistMultiplier < dist)