diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-06-07 10:31:52 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-06-07 10:31:52 +0200 |
commit | 5fd330b35e0a72ccceb1323e78bd227f571b7aee (patch) | |
tree | 26ae0aa36d545cee1005feb005152af5d86d5696 /src/vehicles | |
parent | removed a "fix" (diff) | |
download | re3-5fd330b35e0a72ccceb1323e78bd227f571b7aee.tar re3-5fd330b35e0a72ccceb1323e78bd227f571b7aee.tar.gz re3-5fd330b35e0a72ccceb1323e78bd227f571b7aee.tar.bz2 re3-5fd330b35e0a72ccceb1323e78bd227f571b7aee.tar.lz re3-5fd330b35e0a72ccceb1323e78bd227f571b7aee.tar.xz re3-5fd330b35e0a72ccceb1323e78bd227f571b7aee.tar.zst re3-5fd330b35e0a72ccceb1323e78bd227f571b7aee.zip |
Diffstat (limited to 'src/vehicles')
-rw-r--r-- | src/vehicles/Bike.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/vehicles/Bike.cpp b/src/vehicles/Bike.cpp index 9c769fb0..a7edbfd6 100644 --- a/src/vehicles/Bike.cpp +++ b/src/vehicles/Bike.cpp @@ -2442,16 +2442,24 @@ CBike::BurstTyre(uint8 wheel, bool applyForces) ApplyTurnForce(GetRight() * m_fTurnMass * CGeneral::GetRandomNumberInRange(-0.02f, 0.02f), GetForward()); } -#ifdef FIX_SIGNIFICANT_BUGS // This code checks piece types originally so it is never triggered // as we have converted them to wheel indices above already. if(pDriver){ +#ifdef FIX_SIGNIFICANT_BUGS if(wheel == BIKEWHEEL_FRONT && (m_aSuspensionSpringRatioPrev[BIKESUSP_F1] < 1.0f || m_aSuspensionSpringRatioPrev[BIKESUSP_F2] < 1.0f) || wheel == BIKEWHEEL_REAR && (m_aSuspensionSpringRatioPrev[BIKESUSP_R1] < 1.0f || m_aSuspensionSpringRatioPrev[BIKESUSP_R2] < 1.0f)){ +#else + if(wheel == CAR_PIECE_WHEEL_LF && (m_aSuspensionSpringRatioPrev[BIKESUSP_F1] < 1.0f || m_aSuspensionSpringRatioPrev[BIKESUSP_F2] < 1.0f) || + wheel == CAR_PIECE_WHEEL_LR && (m_aSuspensionSpringRatioPrev[BIKESUSP_R1] < 1.0f || m_aSuspensionSpringRatioPrev[BIKESUSP_R2] < 1.0f)){ +#endif float speedSq = m_vecMoveSpeed.MagnitudeSqr(); if(speedSq > fBikeBurstFallSpeed && (GetStatus() != STATUS_PLAYER || speedSq > fBikeBurstFallSpeedPlayer)){ +#ifdef FIX_SIGNIFICANT_BUGS if(wheel == BIKEWHEEL_FRONT){ +#else + if(wheel == CAR_PIECE_WHEEL_LF){ +#endif KnockOffRider(WEAPONTYPE_RAMMEDBYCAR, 0, pDriver, false); if(pPassengers[0]) KnockOffRider(WEAPONTYPE_RAMMEDBYCAR, 0, pPassengers[0], false); @@ -2460,7 +2468,6 @@ CBike::BurstTyre(uint8 wheel, bool applyForces) } } } -#endif } } |