diff options
author | eray orçunus <erayorcunus@gmail.com> | 2020-06-07 11:46:15 +0200 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2020-06-07 11:46:15 +0200 |
commit | de4323f949accd42264b49e5352ee3522fd575c7 (patch) | |
tree | a6fe982655205cb2f7c585a85ba8c6015beb78d5 /src/peds | |
parent | New ped objectives (diff) | |
parent | making it close to original (diff) | |
download | re3-de4323f949accd42264b49e5352ee3522fd575c7.tar re3-de4323f949accd42264b49e5352ee3522fd575c7.tar.gz re3-de4323f949accd42264b49e5352ee3522fd575c7.tar.bz2 re3-de4323f949accd42264b49e5352ee3522fd575c7.tar.lz re3-de4323f949accd42264b49e5352ee3522fd575c7.tar.xz re3-de4323f949accd42264b49e5352ee3522fd575c7.tar.zst re3-de4323f949accd42264b49e5352ee3522fd575c7.zip |
Diffstat (limited to 'src/peds')
-rw-r--r-- | src/peds/Ped.cpp | 12 | ||||
-rw-r--r-- | src/peds/PlayerPed.cpp | 8 |
2 files changed, 15 insertions, 5 deletions
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp index a6608a78..961b8f61 100644 --- a/src/peds/Ped.cpp +++ b/src/peds/Ped.cpp @@ -185,6 +185,9 @@ CPed::CPed(uint32 pedType) : m_pedIK(this) m_queuedSound = SOUND_NO_SOUND; m_objective = OBJECTIVE_NONE; m_prevObjective = OBJECTIVE_NONE; +#ifdef FIX_BUGS + m_objectiveTimer = 0; +#endif CharCreatedBy = RANDOM_CHAR; m_leader = nil; m_pedInObjective = nil; @@ -244,6 +247,9 @@ CPed::CPed(uint32 pedType) : m_pedIK(this) m_nPedState = PED_IDLE; m_nLastPedState = PED_NONE; m_nMoveState = PEDMOVE_STILL; +#ifdef FIX_BUGS + m_nPrevMoveState = PEDMOVE_NONE; +#endif m_nStoredMoveState = PEDMOVE_NONE; m_pFire = nil; m_pPointGunAt = nil; @@ -6813,7 +6819,7 @@ CPed::EnterCar(void) LineUpPedWithCar(LINE_UP_TO_CAR_START); if (veh->IsBike()) { CBike *bike = (CBike*)veh; - if (bike->GetStatus() != STATUS_ABANDONED || bike->m_bike_flag08 || !m_pVehicleAnim) { + if (bike->GetStatus() != STATUS_ABANDONED || bike->bIsBeingPickedUp || !m_pVehicleAnim) { if (m_nPedState == PED_CARJACK && m_pVehicleAnim) { if (m_pVehicleAnim->currentTime > 0.4f && m_pVehicleAnim->currentTime - m_pVehicleAnim->timeStep <= 0.4f) { int anim = m_pVehicleAnim->animId; @@ -6829,9 +6835,9 @@ CPed::EnterCar(void) // One is pickup and other one is pullup, not same :p if ((anim == ANIM_BIKE_PICKUP_R || anim == ANIM_BIKE_PICKUP_L) && m_pVehicleAnim->currentTime > 0.4667f) - bike->m_bike_flag08 = true; + bike->bIsBeingPickedUp = true; else if ((anim == ANIM_BIKE_PULLUP_R || anim == ANIM_BIKE_PULLUP_L) && m_pVehicleAnim->currentTime > 0.4667f) - bike->m_bike_flag08 = true; + bike->bIsBeingPickedUp = true; } } } else { diff --git a/src/peds/PlayerPed.cpp b/src/peds/PlayerPed.cpp index 38ba2bf9..08f79c7e 100644 --- a/src/peds/PlayerPed.cpp +++ b/src/peds/PlayerPed.cpp @@ -40,6 +40,9 @@ CPlayerPed::CPlayerPed(void) : CPed(PEDTYPE_PLAYER1) { m_fMoveSpeed = 0.0f; SetModelIndex(MI_PLAYER); +#ifdef FIX_BUGS + m_fCurrentStamina = m_fMaxStamina = 150.0f; +#endif SetInitialState(); m_pWanted = new CWanted(); @@ -56,8 +59,9 @@ CPlayerPed::CPlayerPed(void) : CPed(PEDTYPE_PLAYER1) m_pPointGunAt = nil; SetPedState(PED_IDLE); - m_fMaxStamina = 150.0f; - m_fCurrentStamina = m_fMaxStamina; +#ifndef FIX_BUGS + m_fCurrentStamina = m_fMaxStamina = 150.0f; +#endif m_fStaminaProgress = 0.0f; m_nEvadeAmount = 0; m_pEvadingFrom = nil; |