diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-05-26 16:24:47 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-05-26 16:24:47 +0200 |
commit | 0ce2af7a0d233dea7ec38cde0b7434ab64dc6098 (patch) | |
tree | 57108b314e2d41b328fe1c2e3929c0101327af29 /src/vehicles | |
parent | updated librw (diff) | |
parent | updated librw (diff) | |
download | re3-0ce2af7a0d233dea7ec38cde0b7434ab64dc6098.tar re3-0ce2af7a0d233dea7ec38cde0b7434ab64dc6098.tar.gz re3-0ce2af7a0d233dea7ec38cde0b7434ab64dc6098.tar.bz2 re3-0ce2af7a0d233dea7ec38cde0b7434ab64dc6098.tar.lz re3-0ce2af7a0d233dea7ec38cde0b7434ab64dc6098.tar.xz re3-0ce2af7a0d233dea7ec38cde0b7434ab64dc6098.tar.zst re3-0ce2af7a0d233dea7ec38cde0b7434ab64dc6098.zip |
Diffstat (limited to 'src/vehicles')
-rw-r--r-- | src/vehicles/Cranes.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/vehicles/Cranes.cpp b/src/vehicles/Cranes.cpp index dbe4fd2e..db7b514f 100644 --- a/src/vehicles/Cranes.cpp +++ b/src/vehicles/Cranes.cpp @@ -246,8 +246,11 @@ void CCrane::Update(void) Abs(m_pVehiclePickedUp->GetMoveSpeed().x) > CAR_MOVING_SPEED_THRESHOLD || Abs(m_pVehiclePickedUp->GetMoveSpeed().y) > CAR_MOVING_SPEED_THRESHOLD || Abs(m_pVehiclePickedUp->GetMoveSpeed().z) > CAR_MOVING_SPEED_THRESHOLD || - FindPlayerPed()->GetPedState() == PED_ENTER_CAR && // TODO: fix carjack bug - FindPlayerPed()->m_pSeekTarget == m_pVehiclePickedUp) { + (FindPlayerPed()->GetPedState() == PED_ENTER_CAR +#ifdef FIX_BUGS + || FindPlayerPed()->GetPedState() == PED_CARJACK +#endif + ) && FindPlayerPed()->m_pSeekTarget == m_pVehiclePickedUp) { m_pVehiclePickedUp = nil; m_nCraneState = IDLE; } @@ -398,7 +401,7 @@ bool CCrane::RotateCarriedCarProperly() float fDeltaThisFrame = CAR_ROTATION_SPEED * CTimer::GetTimeStep(); if (Abs(fAngleDelta) <= fDeltaThisFrame) // no rotation is actually applied? return true; - m_pVehiclePickedUp->GetMatrix().RotateZ(Abs(fDeltaThisFrame)); + m_pVehiclePickedUp->GetMatrix().RotateZ(fAngleDelta < 0 ? -fDeltaThisFrame : fDeltaThisFrame); return false; } |