summaryrefslogtreecommitdiffstats
path: root/src/peds/Population.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-05-17 20:20:14 +0200
committerGitHub <noreply@github.com>2020-05-17 20:20:14 +0200
commit8a7210cad162930e800f9632afd99ec15a75ebcf (patch)
treeb4f2b7bcc798fbc86867839b00cb9b79fd6eecf1 /src/peds/Population.cpp
parentloading screens (diff)
parentWeapon fixes and thingies (diff)
downloadre3-8a7210cad162930e800f9632afd99ec15a75ebcf.tar
re3-8a7210cad162930e800f9632afd99ec15a75ebcf.tar.gz
re3-8a7210cad162930e800f9632afd99ec15a75ebcf.tar.bz2
re3-8a7210cad162930e800f9632afd99ec15a75ebcf.tar.lz
re3-8a7210cad162930e800f9632afd99ec15a75ebcf.tar.xz
re3-8a7210cad162930e800f9632afd99ec15a75ebcf.tar.zst
re3-8a7210cad162930e800f9632afd99ec15a75ebcf.zip
Diffstat (limited to 'src/peds/Population.cpp')
-rw-r--r--src/peds/Population.cpp26
1 files changed, 4 insertions, 22 deletions
diff --git a/src/peds/Population.cpp b/src/peds/Population.cpp
index 1c613acc..44bedab9 100644
--- a/src/peds/Population.cpp
+++ b/src/peds/Population.cpp
@@ -722,7 +722,7 @@ CPopulation::AddToPopulation(float minDist, float maxDist, float minDistOffScree
}
CPed*
-CPopulation::AddPedInCar(CVehicle* car, bool isPassenger)
+CPopulation::AddPedInCar(CVehicle* car, bool isDriver)
{
int defaultModel = MI_MALE01;
int miamiViceIndex = 0;
@@ -765,7 +765,7 @@ CPopulation::AddPedInCar(CVehicle* car, bool isPassenger)
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);
+ miamiViceIndex = (isDriver ? 2 * CCarCtrl::MiamiViceCycle : 2 * CCarCtrl::MiamiViceCycle + 1);
break;
case MI_TAXI:
case MI_CABBIE:
@@ -816,29 +816,11 @@ CPopulation::AddPedInCar(CVehicle* car, bool isPassenger)
CPed *newPed = CPopulation::AddPed((ePedType)pedType, preferredModel, car->GetPosition(), miamiViceIndex);
newPed->bUsesCollision = false;
- // what??
- if (pedType != PEDTYPE_COP) {
- newPed->SetCurrentWeapon(WEAPONTYPE_COLT45);
+ if (newPed->GetWeapon()->m_eWeaponType != WEAPONTYPE_UNARMED) {
newPed->RemoveWeaponModel(CWeaponInfo::GetWeaponInfo(newPed->GetWeapon()->m_eWeaponType)->m_nModelId);
}
- /*
- // Miami leftover
- if (car->m_vehType == VEHICLE_TYPE_BIKE) {
- newPed->m_pVehicleAnim = CAnimManager::BlendAnimation(newPed->GetClump(), ASSOCGRP_STD, *((CBike*)car + 308h), 100.0f);
- } else */
- // FIX: Make peds comfortable while driving car/boat
-#ifdef FIX_BUGS
- {
- newPed->m_pVehicleAnim = CAnimManager::BlendAnimation(newPed->GetClump(), ASSOCGRP_STD, car->GetDriverAnim(), 100.0f);
- }
-#else
- {
- newPed->m_pVehicleAnim = CAnimManager::BlendAnimation(newPed->GetClump(), ASSOCGRP_STD, ANIM_CAR_SIT, 100.0f);
- }
-#endif
-
- newPed->StopNonPartialAnims();
+ newPed->AddInCarAnims(car, isDriver);
return newPed;
}