diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-06-13 01:02:59 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-06-13 01:02:59 +0200 |
commit | f78f70793580d7ff63fc93f9e6e8a0aae37eb5f9 (patch) | |
tree | 66171e6fd0752e2db84a166a36c6d1ae3ed8921b /src/peds | |
parent | debug fix (diff) | |
download | re3-f78f70793580d7ff63fc93f9e6e8a0aae37eb5f9.tar re3-f78f70793580d7ff63fc93f9e6e8a0aae37eb5f9.tar.gz re3-f78f70793580d7ff63fc93f9e6e8a0aae37eb5f9.tar.bz2 re3-f78f70793580d7ff63fc93f9e6e8a0aae37eb5f9.tar.lz re3-f78f70793580d7ff63fc93f9e6e8a0aae37eb5f9.tar.xz re3-f78f70793580d7ff63fc93f9e6e8a0aae37eb5f9.tar.zst re3-f78f70793580d7ff63fc93f9e6e8a0aae37eb5f9.zip |
Diffstat (limited to 'src/peds')
-rw-r--r-- | src/peds/Ped.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp index 785050c9..12b4ef8d 100644 --- a/src/peds/Ped.cpp +++ b/src/peds/Ped.cpp @@ -19167,10 +19167,11 @@ CPed::AttachPedToEntity(CEntity *ent, CVector offset, uint16 type, float rot, eW void CPed::DettachPedFromEntity(void) { + CEntity* pVehicleAttachedTo = m_attachedTo; m_attachedTo = nil; if (m_nPedState == PED_DIE) { - m_pCollidingEntity = m_attachedTo; - ApplyMoveForce(m_attachedTo->GetForward() * -4.0f); + m_pCollidingEntity = pVehicleAttachedTo; + ApplyMoveForce(pVehicleAttachedTo->GetForward() * -4.0f); bIsStanding = false; } else if (m_nPedState != PED_DEAD) { RestorePreviousState(); |