From 1aac4d802f6cb12c35b877838c425c95fa92aea4 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Mon, 26 Jul 2021 07:41:34 +0300 Subject: Fix Tommy looking at one spot due to crouching + shooting --- src/peds/PlayerPed.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/peds') diff --git a/src/peds/PlayerPed.cpp b/src/peds/PlayerPed.cpp index 8225189f..d96cb683 100644 --- a/src/peds/PlayerPed.cpp +++ b/src/peds/PlayerPed.cpp @@ -1221,11 +1221,21 @@ CPlayerPed::ProcessPlayerWeapon(CPad *padUsed) } if (padUsed->DuckJustDown() && !bIsDucking && m_nMoveState != PEDMOVE_SPRINT) { +#ifdef FIX_BUGS + // fix tommy being locked into looking at the same spot if you duck just after starting to shoot + if(!m_pPointGunAt) + ClearPointGunAt(); +#endif bCrouchWhenShooting = true; SetDuck(60000, true); } else if (bIsDucking && (padUsed->DuckJustDown() || m_nMoveState == PEDMOVE_SPRINT || padUsed->GetSprint() || padUsed->JumpJustDown() || padUsed->ExitVehicleJustDown())) { +#ifdef FIX_BUGS + // same fix as above except for standing up + if(!m_pPointGunAt) + ClearPointGunAt(); +#endif ClearDuck(true); bCrouchWhenShooting = false; } -- cgit v1.2.3