diff options
author | erorcun <erayorcunus@gmail.com> | 2020-02-29 15:40:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-29 15:40:39 +0100 |
commit | 625a43064a3daad0dd02878f2ce67654eb3a0da4 (patch) | |
tree | 84f3dc2642869bc046888c24683cc80712652ba7 /src/peds/Ped.cpp | |
parent | script fixes (diff) | |
parent | CPopulation 3 and fixes (diff) | |
download | re3-625a43064a3daad0dd02878f2ce67654eb3a0da4.tar re3-625a43064a3daad0dd02878f2ce67654eb3a0da4.tar.gz re3-625a43064a3daad0dd02878f2ce67654eb3a0da4.tar.bz2 re3-625a43064a3daad0dd02878f2ce67654eb3a0da4.tar.lz re3-625a43064a3daad0dd02878f2ce67654eb3a0da4.tar.xz re3-625a43064a3daad0dd02878f2ce67654eb3a0da4.tar.zst re3-625a43064a3daad0dd02878f2ce67654eb3a0da4.zip |
Diffstat (limited to '')
-rw-r--r-- | src/peds/Ped.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp index 1ea13cc2..3e9bfc51 100644 --- a/src/peds/Ped.cpp +++ b/src/peds/Ped.cpp @@ -1519,7 +1519,7 @@ CPed::BeingDraggedFromCar(void) #ifdef VC_PED_PORTS if (m_objective == OBJECTIVE_LEAVE_CAR_AND_DIE) { if (m_pMyVehicle) { - m_pMyVehicle->ProcessOpenDoor(m_vehEnterType, NUM_ANIMS, m_pVehicleAnim->currentTime); + m_pMyVehicle->ProcessOpenDoor(m_vehEnterType, NUM_ANIMS, m_pVehicleAnim->currentTime * 5.0f); } } #endif @@ -2954,6 +2954,11 @@ CPed::QuitEnteringCar(void) if (veh->m_nNumGettingIn != 0) veh->m_nNumGettingIn--; +#ifdef VC_PED_PORTS + if (m_objective == OBJECTIVE_ENTER_CAR_AS_DRIVER || m_objective == OBJECTIVE_ENTER_CAR_AS_PASSENGER) + RestorePreviousObjective(); +#endif + veh->m_nGettingInFlags &= ~GetCarDoorFlag(m_vehEnterType); } @@ -2965,7 +2970,7 @@ CPed::QuitEnteringCar(void) animAssoc = m_pVehicleAnim; if (animAssoc) { animAssoc->blendDelta = -4.0f; - animAssoc->flags |= ASSOC_FADEOUTWHENDONE; + animAssoc->flags |= ASSOC_DELETEFADEDOUT; animAssoc = m_pVehicleAnim; animAssoc->flags &= ~ASSOC_RUNNING; } @@ -4161,7 +4166,10 @@ CPed::ClearObjective(void) { if (IsPedInControl() || m_nPedState == PED_DRIVING) { m_objective = OBJECTIVE_NONE; - +#ifdef VC_PED_PORTS + m_pedInObjective = nil; + m_carInObjective = nil; +#endif if (m_nPedState == PED_DRIVING && m_pMyVehicle) { if (m_pMyVehicle->pDriver != this) { @@ -13603,7 +13611,10 @@ CPed::ProcessObjective(void) if (InVehicle()) { if (m_nPedState != PED_EXIT_CAR && m_nPedState != PED_DRAG_FROM_CAR && m_nPedState != PED_EXIT_TRAIN && (m_nPedType != PEDTYPE_COP - || m_pMyVehicle->m_vecMoveSpeed.MagnitudeSqr2D() < 0.000025f)) { +#ifdef VC_PED_PORTS + || m_pMyVehicle->IsBoat() +#endif + || m_pMyVehicle->m_vecMoveSpeed.MagnitudeSqr2D() < sq(0.005f))) { if (m_pMyVehicle->IsTrain()) SetExitTrain(m_pMyVehicle); #ifdef VC_PED_PORTS |