diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-05-10 11:25:30 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-05-10 11:25:30 +0200 |
commit | 2f7d2fa3ad697b6fa1896ac75f97c23f52ed843e (patch) | |
tree | 24ca53597b1ebf632b12fb315ef91e899807d47d /src/peds/Population.cpp | |
parent | Merge pull request #528 from Nick007J/miami (diff) | |
download | re3-2f7d2fa3ad697b6fa1896ac75f97c23f52ed843e.tar re3-2f7d2fa3ad697b6fa1896ac75f97c23f52ed843e.tar.gz re3-2f7d2fa3ad697b6fa1896ac75f97c23f52ed843e.tar.bz2 re3-2f7d2fa3ad697b6fa1896ac75f97c23f52ed843e.tar.lz re3-2f7d2fa3ad697b6fa1896ac75f97c23f52ed843e.tar.xz re3-2f7d2fa3ad697b6fa1896ac75f97c23f52ed843e.tar.zst re3-2f7d2fa3ad697b6fa1896ac75f97c23f52ed843e.zip |
Diffstat (limited to 'src/peds/Population.cpp')
-rw-r--r-- | src/peds/Population.cpp | 15 |
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?? |