summaryrefslogtreecommitdiffstats
path: root/src/peds/Population.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-05-10 12:31:21 +0200
committerGitHub <noreply@github.com>2020-05-10 12:31:21 +0200
commit058690aad74a69a13b5f1f421af9918c394ca0fb (patch)
tree1544037570bbdae6dd83b54f07931d3abf59bf3e /src/peds/Population.cpp
parentCSimpleModelInfo (diff)
parentfix boats (diff)
downloadre3-058690aad74a69a13b5f1f421af9918c394ca0fb.tar
re3-058690aad74a69a13b5f1f421af9918c394ca0fb.tar.gz
re3-058690aad74a69a13b5f1f421af9918c394ca0fb.tar.bz2
re3-058690aad74a69a13b5f1f421af9918c394ca0fb.tar.lz
re3-058690aad74a69a13b5f1f421af9918c394ca0fb.tar.xz
re3-058690aad74a69a13b5f1f421af9918c394ca0fb.tar.zst
re3-058690aad74a69a13b5f1f421af9918c394ca0fb.zip
Diffstat (limited to 'src/peds/Population.cpp')
-rw-r--r--src/peds/Population.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/peds/Population.cpp b/src/peds/Population.cpp
index 1d8c7f5d..2dc0bbab 100644
--- a/src/peds/Population.cpp
+++ b/src/peds/Population.cpp
@@ -460,7 +460,7 @@ CPopulation::PedCreationDistMultiplier()
}
CPed*
-CPopulation::AddPed(ePedType pedType, uint32 miOrCopType, CVector const &coors)
+CPopulation::AddPed(ePedType pedType, uint32 miOrCopType, CVector const &coors, int32 modifier)
{
switch (pedType) {
case PEDTYPE_CIVMALE:
@@ -480,7 +480,7 @@ CPopulation::AddPed(ePedType pedType, uint32 miOrCopType, CVector const &coors)
}
case PEDTYPE_COP:
{
- CCopPed *ped = new CCopPed((eCopType)miOrCopType);
+ CCopPed *ped = new CCopPed((eCopType)miOrCopType, modifier);
ped->SetPosition(coors);
ped->SetOrientation(0.0f, 0.0f, 0.0f);
CWorld::Add(ped);
@@ -713,9 +713,10 @@ CPopulation::AddToPopulation(float minDist, float maxDist, float minDistOffScree
}
CPed*
-CPopulation::AddPedInCar(CVehicle* car)
+CPopulation::AddPedInCar(CVehicle* car, bool isPassenger)
{
int defaultModel = MI_MALE01;
+ int miamiViceIndex = 0;
bool imSureThatModelIsLoaded = true;
CVector coors = FindPlayerCoors();
CZoneInfo zoneInfo;
@@ -740,7 +741,6 @@ CPopulation::AddPedInCar(CVehicle* car)
break;
case MI_POLICE:
case MI_PREDATOR:
- case MI_VICECHEE: // TODO(MIAMI): proper model
preferredModel = COP_STREET;
pedType = PEDTYPE_COP;
break;
@@ -753,6 +753,11 @@ CPopulation::AddPedInCar(CVehicle* car)
preferredModel = COP_ARMY;
pedType = PEDTYPE_COP;
break;
+ case MI_VICECHEE: // TODO(MIAMI): figure out new structure of the function
+ preferredModel = COP_MIAMIVICE;
+ pedType = PEDTYPE_COP;
+ miamiViceIndex = (isPassenger ? 2 * CCarCtrl::MiamiViceCycle : 2 * CCarCtrl::MiamiViceCycle + 1);
+ break;
case MI_TAXI:
case MI_CABBIE:
case MI_ZEBRA:
@@ -799,7 +804,7 @@ CPopulation::AddPedInCar(CVehicle* car)
pedType = ((CPedModelInfo*)CModelInfo::GetModelInfo(defaultModel))->m_pedType;
}
- CPed *newPed = CPopulation::AddPed((ePedType)pedType, preferredModel, car->GetPosition());
+ CPed *newPed = CPopulation::AddPed((ePedType)pedType, preferredModel, car->GetPosition(), miamiViceIndex);
newPed->bUsesCollision = false;
// what??