summaryrefslogtreecommitdiffstats
path: root/src/peds
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-11-01 16:21:05 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2020-11-01 16:21:05 +0100
commit5edd9e75da54534fe48c779d4f6c6cd17535be10 (patch)
tree5505f214854be20adf4fb71354be7129713078c2 /src/peds
parentfixed KYFC (diff)
downloadre3-5edd9e75da54534fe48c779d4f6c6cd17535be10.tar
re3-5edd9e75da54534fe48c779d4f6c6cd17535be10.tar.gz
re3-5edd9e75da54534fe48c779d4f6c6cd17535be10.tar.bz2
re3-5edd9e75da54534fe48c779d4f6c6cd17535be10.tar.lz
re3-5edd9e75da54534fe48c779d4f6c6cd17535be10.tar.xz
re3-5edd9e75da54534fe48c779d4f6c6cd17535be10.tar.zst
re3-5edd9e75da54534fe48c779d4f6c6cd17535be10.zip
Diffstat (limited to '')
-rw-r--r--src/peds/Ped.cpp14
-rw-r--r--src/peds/Ped.h1
2 files changed, 15 insertions, 0 deletions
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);
+}
diff --git a/src/peds/Ped.h b/src/peds/Ped.h
index 1f0e9243..aa0a69db 100644
--- a/src/peds/Ped.h
+++ b/src/peds/Ped.h
@@ -911,6 +911,7 @@ public:
static void DeleteSunbatheIdleAnimCB(CAnimBlendAssociation *assoc, void *arg);
static void PedSetPreviousStateCB(CAnimBlendAssociation *assoc, void *arg);
static void PedAnimShuffleCB(CAnimBlendAssociation *assoc, void *arg);
+ static void PedSetGetInCarPositionCB(CAnimBlendAssociation* assoc, void* arg);
bool IsPlayer(void);
bool IsFemale(void) { return m_nPedType == PEDTYPE_CIVFEMALE || m_nPedType == PEDTYPE_PROSTITUTE; }