From bc3734cae3aeb6334314b67951eb31d7dd6c14d6 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Mon, 26 Jul 2021 09:13:16 +0300 Subject: Fix smooth spray when shooting with colt or usi while using PC controls --- src/peds/PlayerPed.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/peds/PlayerPed.cpp') diff --git a/src/peds/PlayerPed.cpp b/src/peds/PlayerPed.cpp index 6d6fc714..416fb949 100644 --- a/src/peds/PlayerPed.cpp +++ b/src/peds/PlayerPed.cpp @@ -503,6 +503,10 @@ CPlayerPed::DoWeaponSmoothSpray(void) { if (m_nPedState == PED_ATTACK && !m_pPointGunAt) { eWeaponType weapon = GetWeapon()->m_eWeaponType; +#ifdef FREE_CAM + if(TheCamera.Cams[0].Using3rdPersonMouseCam() && (weapon == WEAPONTYPE_COLT45 || weapon == WEAPONTYPE_UZI)) + return false; +#endif if (weapon == WEAPONTYPE_FLAMETHROWER || weapon == WEAPONTYPE_COLT45 || weapon == WEAPONTYPE_UZI || weapon == WEAPONTYPE_SHOTGUN || weapon == WEAPONTYPE_AK47 || weapon == WEAPONTYPE_M16 || weapon == WEAPONTYPE_HELICANNON) return true; @@ -1183,6 +1187,13 @@ CPlayerPed::PlayerControlZelda(CPad *padUsed) padMoveInGameUnit = CVector2D(leftRight, upDown).Magnitude() / PAD_MOVE_TO_GAME_WORLD_MOVE; } +#ifdef FREE_CAM + if(TheCamera.Cams[0].Using3rdPersonMouseCam() && doSmoothSpray) { + padMoveInGameUnit = 0.0f; + smoothSprayWithoutMove = false; + } +#endif + if (padMoveInGameUnit > 0.0f || smoothSprayWithoutMove) { float padHeading = CGeneral::GetRadianAngleBetweenPoints(0.0f, 0.0f, -leftRight, upDown); float neededTurn = CGeneral::LimitRadianAngle(padHeading - camOrientation); -- cgit v1.2.3