From 5edd9e75da54534fe48c779d4f6c6cd17535be10 Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sun, 1 Nov 2020 18:21:05 +0300 Subject: finished script and replay --- src/peds/Ped.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/peds/Ped.cpp') diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp index 03c0bf2c..15eb79b6 100644 --- a/src/peds/Ped.cpp +++ b/src/peds/Ped.cpp @@ -21440,3 +21440,17 @@ CPed::SetLook(float direction) SetLookFlag(direction, false); } } + +// --MIAMI: Done +// Unused +void CPed::PedSetGetInCarPositionCB(CAnimBlendAssociation* assoc, void* arg) +{ + CPed* pPed = (CPed*)arg; + CMatrix mat(pPed->GetMatrix()); + CVehicle* pVehicle = pPed->m_pMyVehicle; + const CVector& offset = (pVehicle->bIsVan && (pPed->m_vehEnterType == CAR_DOOR_RR || pPed->m_vehEnterType == CAR_DOOR_LR)) ? vecPedVanRearDoorAnimOffset : vecPedCarDoorAnimOffset; + CVector position = Multiply3x3(mat, offset) + pPed->GetPosition(); + CPedPlacement::FindZCoorForPed(&position); + pPed->SetMoveSpeed(0.0f, 0.0f, 0.0f); + pPed->SetPosition(position); +} -- cgit v1.2.3