summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-07-26 08:13:16 +0200
committerSergeanur <s.anureev@yandex.ua>2021-07-26 08:13:16 +0200
commitbc3734cae3aeb6334314b67951eb31d7dd6c14d6 (patch)
tree1f37a7da5bf7e6a9e163c2475e29da558ab684bd /src
parentFix ridiculously accurate bullets when you shoot behind with enabled free camera (diff)
downloadre3-bc3734cae3aeb6334314b67951eb31d7dd6c14d6.tar
re3-bc3734cae3aeb6334314b67951eb31d7dd6c14d6.tar.gz
re3-bc3734cae3aeb6334314b67951eb31d7dd6c14d6.tar.bz2
re3-bc3734cae3aeb6334314b67951eb31d7dd6c14d6.tar.lz
re3-bc3734cae3aeb6334314b67951eb31d7dd6c14d6.tar.xz
re3-bc3734cae3aeb6334314b67951eb31d7dd6c14d6.tar.zst
re3-bc3734cae3aeb6334314b67951eb31d7dd6c14d6.zip
Diffstat (limited to 'src')
-rw-r--r--src/peds/Ped.cpp3
-rw-r--r--src/peds/PlayerPed.cpp11
2 files changed, 14 insertions, 0 deletions
diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp
index 8d0fbbe8..147b1218 100644
--- a/src/peds/Ped.cpp
+++ b/src/peds/Ped.cpp
@@ -1348,6 +1348,9 @@ CPed::CalculateNewVelocity(void)
limitedRotDest -= 2 * PI;
}
+#ifdef FREE_CAM
+ if (!TheCamera.Cams[0].Using3rdPersonMouseCam())
+#endif
if (IsPlayer() && m_nPedState == PED_ATTACK)
headAmount /= 4.0f;
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);