summaryrefslogtreecommitdiffstats
path: root/src/vehicles
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-05-25 22:34:47 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-05-25 22:34:47 +0200
commit15a99da50e330f2116bbda57695064fa9cf5772b (patch)
treefa4daa1af0a25d87269cd24bf916e3a801752fda /src/vehicles
parentsmall fixes (diff)
downloadre3-15a99da50e330f2116bbda57695064fa9cf5772b.tar
re3-15a99da50e330f2116bbda57695064fa9cf5772b.tar.gz
re3-15a99da50e330f2116bbda57695064fa9cf5772b.tar.bz2
re3-15a99da50e330f2116bbda57695064fa9cf5772b.tar.lz
re3-15a99da50e330f2116bbda57695064fa9cf5772b.tar.xz
re3-15a99da50e330f2116bbda57695064fa9cf5772b.tar.zst
re3-15a99da50e330f2116bbda57695064fa9cf5772b.zip
Diffstat (limited to 'src/vehicles')
-rw-r--r--src/vehicles/Cranes.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/vehicles/Cranes.cpp b/src/vehicles/Cranes.cpp
index 936a4510..757974a6 100644
--- a/src/vehicles/Cranes.cpp
+++ b/src/vehicles/Cranes.cpp
@@ -243,8 +243,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;
}
@@ -395,7 +398,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;
}